-
Notifications
You must be signed in to change notification settings - Fork 394
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
Only run merge-scheduler workflow if it's not a fork #3267
Conversation
julieg18
commented
Feb 11, 2022
•
edited
Loading
edited
- As shown by start: use tabs for a Windows command #3215, the merge-schedule workflow only runs for prs that aren't from forks and will fail if it runs on a forked pr.
@@ -11,13 +11,15 @@ on: | |||
jobs: | |||
merge_schedule: | |||
runs-on: ubuntu-latest | |||
if: | |||
${{ github.event.pull_request.head.repo.full_name == github.repository }} |
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.
Checks if the repo name of the pull request equals the github repo. I tested it with a fork (#3270) and it appears to work correctly!
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.
Looks good! Thanks for the quick fix!
@shcheklein Yes, the multiple checks are expected. The check runs every time a pr is opened, edited, or receives new commits.
The action uses the github rest api to merge the pr. So I believe the action itself is the author! It should look something like this:
Yes. The github action doesn't run on forks for security reasons. |
@julieg18 thanks!
🤔 hmm, why don't we see the same for the link checker, unit tests, etc? (it's the first time I see the checks being duplicated this way). anyways, we can't keep it this way I think - it'll be exploding on some long-running PRs
does it mean that anyone can come and create a PR and it'll be automatically merged (if they put a time to merge it in the description)?
what error message do we see in this case? can it be changed - per repo or per specific action? and the most important - do we want this to be changed (somewhat related to the previous question I think) |
The same check can be duplicated when it is configured to run for different events. For example, our But most of our checks only need to run for one event and thus, aren't getting duplicated like
Agreed! Maybe we can look for github action alternatives or update the configuration for this one.
I believe that it can't be merged unless it has atleast one approving review. But I'll create a test right now to be sure.
Here's the error message: I don't think it can be changed. What do you mean exactly by "do we want this to be changed"? Changed to what exactly? |
Sorry for the confusion. |
Oh, ok! Thanks for the clarification! No, I don't think so. The merge-schedule action doesn't offer a way to change this behavior. |