Readme-Workflows / recent-activity

Add your recent activity to your profile readme!
https://readme-workflows.github.io/recent-activity/
MIT License
129 stars 45 forks source link

Feature: Split PR & issues into separate events #272

Closed A2-NieR closed 1 year ago

A2-NieR commented 1 year ago

Type of Pull request

Description

This PR splits the pr and issue events into different events so users can better include/exclude specific events.

To Do:

abhijoshi2k commented 1 year ago

For backward compatibility, we shouldn't discard the original pr and issue events. If the older events are excluded, they should block all sub events.

For example, if pr is excluded, it should block pr_opened, pr_merged and pr_closed events.

A2-NieR commented 1 year ago

For backward compatibility, we shouldn't discard the original pr and issue events. If the older events are excluded, they should block all sub 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. Btw. how does one test the workflow? Tried with act but always run into this error:

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.
abhijoshi2k commented 1 year ago

You can run the workflow on your own repo to test it. For example, you can run the workflow by editing your workflow file as: BunnyTheLifeguard/recent-activity@feat/split-pr-events

A2-NieR commented 1 year ago

Reverted the Events according to the GH API and implemented a filter to extract disabled issues/pr actions.

PuneetGopinath commented 1 year ago

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. Did you test it? If so can you show the workflow results

I'm really very sorry for being inactive.

PuneetGopinath commented 1 year ago

@Andre601 @abhijoshi2k Should we change 2021 to 2023 in the copyright in all code files? Or instead 2021 - 2023? What's your opinion?

And the code has been tested and works... LGTM @BunnyTheLifeguard Thank you for your contribution!

A2-NieR commented 1 year ago

@Andre601 @abhijoshi2k Should we change 2021 to 2023 in the copyright in all code files? Or instead 2021 - 2023? What's your opinion?

And the code has been tested and works... LGTM @BunnyTheLifeguard Thank you for your contribution!

Awesome, thanks.

In my own repo I saw that PR stuff was listed again, but had no time to test for merge, close etc. :/

abhijoshi2k commented 1 year ago

@PuneetGopinath I think we can change that to 2023. Feel free to do the change before release.

PuneetGopinath commented 1 year ago

@Andre601 Can you do the release? I don't remember anything after a year of not touching github 😄

Andre601 commented 1 year ago

@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. What release version should it be?