Repository navigation
fix: backport the landed commits of squash and rebase merges - #877
Merged
Merged
Conversation
Full requests picked the original commits of a pull request. After a squash or rebase merge those only live on the head branch, which is often a fork or already deleted, so the cherry-pick failed. Use the commits that landed on the base branch when the merge method is certain, and fetch the pull request head so the original commits are always available. Report the cherry-pick error instead of the failed abort that hid it. Signed-off-by: Julius Knorr <jus@bitgrid.net> Assisted-by: ClaudeCode:claude-opus-5-5
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Member
ooof |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/backport to <branch>cherry-picks the original commits of a pull request. After a squash or rebase merge those only exist on the head branch, so backports of fork PRs always failed, and same-repo PRs failed once their branch was deleted. The error saidno cherry-pick or revert in progress, because the failedcherry-pick --abortreplaced the real error. Example: Euro-Office/sdkjs#216, 26 of 49 backports failed this way.(#<pr>)pull/<n>/head, so the original commits also exist for partial, forced and fallback requestsTests: squash, rebase, unordered rebase, unknown method, merge commit, open PR, and the real cherry-pick error. 4 of them fail without the fix. The
pull/<n>/headfetch has no unit test, becausecloneAndCacheRepohardcodes the github.com remote. Checked by hand against a fork PR, and live against Euro-Office PRs:a9a939c9a08ac51c