Feature: Split PR & issues into separate events#272
Feature: Split PR & issues into separate events#272PuneetGopinath merged 10 commits intoReadme-Workflows:mainfrom
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
| 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.
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.
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.
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.
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!
PuneetGopinath
left a comment
There was a problem hiding this comment.
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: