-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Split PR & issues into separate events #272
Feature: Split PR & issues into separate events #272
Conversation
For backward compatibility, we shouldn't discard the original pr and issue events. For example, if pr is excluded, it should block pr_opened, pr_merged and pr_closed events. |
Makes sense. I will look into it. act -s GITHUB_TOKEN=ghp_xyz... -j build -W .github/workflows/test-workflow.yml
docker exec cmd=[node /var/run/act/actions/Readme-Workflows-recent-activity@main/dist/index.js] user= workdir=
| serializers
| {
| PushEvent: [Function: PushEvent],
| IssuesEvent: [Function: IssuesEvent],
| PullRequestEvent: [Function: PullRequestEvent],
| CreateEvent: [Function: CreateEvent],
| ForkEvent: [Function: ForkEvent],
| GollumEvent: [Function: GollumEvent],
| MemberEvent: [Function: MemberEvent],
| PullRequestReviewEvent: [Function: PullRequestReviewEvent],
| ReleaseEvent: [Function: ReleaseEvent],
| WatchEvent: [Function: WatchEvent]
| }
| ✖ error Event `push` is not supported by this action. |
You can run the workflow on your own repo to test it. |
src/serializers.js
Outdated
@@ -10,8 +10,11 @@ const IssueCommentEvent = require("./events/IssueCommentEvent"); | |||
const CommitCommentEvent = require("./events/CommitCommentEvent"); | |||
const PullRequestReviewCommentEvent = require("./events/PullRequestReviewCommentEvent"); | |||
const PushEvent = require("./events/PushEvent"); | |||
const IssuesEvent = require("./events/IssuesEvent"); | |||
const PullRequestEvent = require("./events/PullRequestEvent"); | |||
const IssuesOpenEvent = require("./events/IssuesOpenEvent"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where the problem lies. GitHub API does not provide a type of the value "IssuesOpenEvent" or the other new names that you have made. Due to this change, while testing I see that none of the issue and pull request-related events are shown in the profile.
You can checkout https://docs.github.com/en/developers/webhooks-and-events/github-event-types for the docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have to modify the functions/filterContent.js file to use the respective serializers for their respective events
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see, thanks for the info.
Rn I don't have the time, so I can close the PR until I can look into this if you want me to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to close the pr, let it be open. Whenever free you can look into the issue, that's not an problem.
We appreciate your efforts to contribute to Readme-Workflows!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do the needful.
f423e4f
to
cdd8e50
Compare
cdd8e50
to
c2b5675
Compare
Reverted the Events according to the GH API and implemented a filter to extract disabled issues/pr actions. |
Sorry, I read the comment and the forgot it totally. I'm really very sorry for being inactive. |
@Andre601 @abhijoshi2k Should we change 2021 to 2023 in the copyright in all code files? Or instead 2021 - 2023? And the code has been tested and works... LGTM @bunnythelifeguard |
Awesome, thanks. In my own repo I saw that PR stuff was listed again, but had no time to test for merge, close etc. :/ |
@PuneetGopinath I think we can change that to 2023. Feel free to do the change before release. |
@Andre601 Can you do the release? I don't remember anything after a year of not touching github 😄 |
Me neither. Need to look at this. |
Type of Pull request
This Pull request doesn't break existing configuration.
This Pull request will break existing configuration.
This Pull request will fix a (critical) bug.
This Pull request only changes documentation (README.md, CHANGELOG.md, etc.)
__________
Description
This PR splits the pr and issue events into different events so users can better include/exclude specific events.
To Do: