-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Skip CI if merge conflicts exist #12627
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
base: master
Are you sure you want to change the base?
Conversation
GitHub Actions triggered by
The I'm not a SME on the place of Note also that the trigger setup dates to the initial commit and hasn't been touched since. So removing |
@Jaculabilis I think the intent (though I may be wrong) is that CI still runs as commits are pushed, so I don't know if removing the |
Yes, if we want to run CI when e.g. commits are pushed directly to |
console.log("Not a pull request, skipping merge conflict check."); | ||
return; | ||
} | ||
const { data: pr } = await github.rest.pulls.get({ |
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.
I don't know we can use this endpoint. I know from experience that github takes a while to figure out if something can be merged or not. Isn't the error message from the checkout action enough? This would run another action to the average pull request, while merge conflicts in pull requests are rather the exception.
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.
I'm totally down to find another way of accomplishing this--you hit on the head my biggest concern about Github taking too long to settle (we don't want to have maintainers constantly having to kick CI). Can you give a bit more color to what you're thinking with the checkout action?
As for the rest, I don't really think having an extra action (especially if it prevents other bogus runs) is a big deal, and I'd hope that if development pace picks up we'd see more potential conflicts.
Motivation
This PR stops CI from running at all if merge conflicts exist.
Context
I noticed that another PR kicked off a bunch of CI despite being full of merge conflicts--this seems like a waste of resources.
I'm not sure this is the best way to fix that, or even if we want to skip CI when merge conflicts exist, but I figured this is a starting point.
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.