-
Notifications
You must be signed in to change notification settings - Fork 1
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
Action fails with unhelpful error message when PR branch is out of date with target branch #19
Comments
We saw this again today and I think we've identified where the problem lies, and that is outside of the code in this repository. It's surprising that the default behaviour of GitHub's Checkout Action is that it creates a merge commit by default, rather than just running against We see "Error: Conflict merging main into ": It looks like the workaround is documented in the checkout action's readme here (also mentioned in the issue I linked to above). Unfortunately that means we will need to update every workflow that we have, or at least definitely all of the ones that use our upload action, to explicitly checkout Remediation in respect of this repository specifically should be to update the readme to mention this, in order to save confusion in future. |
We have been conforming the branch protection rule for the As far as I can tell, that sub-option negates the need for our checkout action invocations to create a merge commit to run checks against, because we'll always be told "This branch is out-of-date with the base branch" with an "Update branch" button in the GitHub UI to add a merge commit from This brings me to the conclusion that we probably need to standardise the replacement of our existing checkout action invocations that currently look like this: - uses: actions/checkout@v2 With this longer form: - uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }} This is very disappointing as it would have been really nice had we been able to use the checkout action without needing to specify any explict config (i.e. prefer convention over configuration). But, fundamentally, we're seeing too many occasions where we have multiple pull requests all targeting the |
Just had another proper look in to this and I'm now thinking it's to do with this
I'll make a 1.1 release tomorrow with this set to false. |
Ooh, exciting. Thanks for looking, @owenpearson. Fingers crossed! 😄 |
See this run for example behaviour.
The text was updated successfully, but these errors were encountered: