Skip to content
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

limit-pull-requests checks PR count by who triggers the workflow rather than PR author #603

Open
karaarda opened this issue Oct 30, 2024 · 4 comments
Labels

Comments

@karaarda
Copy link

github.context.actor is the initiator of the workflow. To get the original author of the PR github.context.payload.user.login should be user. Please refer to https://github.com/orgs/community/discussions/25502.

@ZhongRuoyu

@ZhongRuoyu
Copy link
Member

Thanks for reporting; technically you're right, but is there a case where there is actual difference between the two, given that its intended use case is when github.event_name == 'pull_request_target' && github.event.action == 'opened'?

@karaarda
Copy link
Author

Well, its intended use case is not documented and as this is a public repository anyone can include this action in their workflows like I did. It didn't play well in our approach where we would like to run our checks on 'opened', 'reopened' and 'synchronize'

Also if it is only ran on 'opened', doesn't it mean that one can just reopen the repo to walk around the PR limit?

I can open a PR with the fix if you agree it is a potential bug

@MikeMcQuaid
Copy link
Member

I can open a PR with the fix if you agree it is a potential bug

Reviewing a PR will be easier to discuss, yes, please 👍🏻

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the Stale label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants