-
Notifications
You must be signed in to change notification settings - Fork 27
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
Conflict resolve suggestion doesn't fetch commits to cherry-pick #424
Comments
@GuyAv46 Can you provide the version you are using for this workflow? |
I used the new
after more thinking this problem might happen when the action detects a “rebase and merge” method. Maybe it is useful to fetch the head branch in this case? Or all the about-to-be-cherry-picked commits? |
Why not just call |
Thanks for reporting @GuyAv46 You're right that the suggestion currently doesn't fetch all the required references. The commits to cherry-pick may not be known locally. Reading the suggestions again, I believe this issue appears for all merge methods (including merge commit), regardless of the new experimental By default: backport-action/src/backport.ts Lines 628 to 634 in bd410d3
With backport-action/src/backport.ts Lines 616 to 623 in bd410d3
In both cases, the commits to cherry-pick may be unreachable after the suggested git fetch. Example:
We must add an additional fetch based on the merge method to resolve this. The action already does this, so we should also suggest to do this locally: backport-action/src/backport.ts Lines 147 to 155 in bd410d3
On rebase: backport-action/src/backport.ts Lines 158 to 166 in bd410d3
Otherwise: backport-action/src/backport.ts Lines 132 to 136 in bd410d3
|
As a quick fix, we can add a Eventually, I think we'll need to switch to explicit github refs and commit shas in the fetch. Otherwise, we could simply add a note about this bug to the suggestion. I'm also open to other ideas. @GuyAv46 @AlexVermette-Eaton, I'd welcome new contributions to resolve this 🙇. Let me know if you're interested in giving it a try. Otherwise, I'll pick this up eventually, but I don't have time at the moment. While annoying, I don't see this as a critical bug (using |
Describe the bug
When backporting a PR that was merged with the "squash and merge" method, and the backporting fails (due to conflicts), the suggestion message doesn't work, because it does not fetch the original PR target branch, and therefore the squashed commit sha is unknown locally.
To Reproduce
Expected behavior
If the "squash and merge" method was detected, and a failure occurred, include the original PR's base branch or the squashed commit sha at the beginning of the suggestion:
or
The text was updated successfully, but these errors were encountered: