-
Notifications
You must be signed in to change notification settings - Fork 207
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
fix: ignore forks #250
fix: ignore forks #250
Conversation
Nice but I think this should be guarded by a new action input, defaulting to false, as it could break some existing workflows based on PRs I guess. |
I would recommend against making it default, there is no way someone writing the following code intended to load artifacts from any fork from the internet:
We wouldn't have caught it if our target workflow didn't require approval on the first run. What do you want the input name to be? |
proposed a version that might work for both of us, I'm testing it out right now; let me know if that model works for you. Otherwise I'll do the simple flag. |
Ready for merge, used in yaml, run
|
Co-authored-by: Dawid Dziurla <[email protected]>
Very nice. Thanks for contribution! |
Contributes to #249
When working with the GitHub API, a run originating from a fork might still have the same branch name (e.g., master) as the parent repository. To filter out runs from forks, we check the
head_repository
attribute of the run. This attribute contains information about the repository where the head of the pull request is stored.