Skip to content

Conversation

@jakebailey
Copy link
Member

When running this task on an unmerged PR, it will be using the merge commit that GitHub generates for every PR. You can't cherry-pick a merge commit without telling it which side of the merge is the intended base. So, the job fails with:

/usr/bin/git config user.email typescriptbot@microsoft.com
/usr/bin/git config user.name TypeScript Bot
/usr/bin/git switch --detach origin/release-5.3
HEAD is now at b4fe221e65 Cherry-pick #56489 into release-5.3 (#56490)
/usr/bin/git switch -c cherry-pick/56504/release-5.3
Switched to a new branch 'cherry-pick/56504/release-5.3'
/usr/bin/git cherry-pick dbd9bbb928adbe9e21cbbd8947729e206e463bcc
error: commit dbd9bbb928adbe9e21cbbd8947729e206e463bcc is a merge but no -m option was given.
fatal: cherry-pick failed
Error: The process '/usr/bin/git' failed with exit code 128

By specifying -m 1, we can tell git that HEAD^1 is the merge base (i.e. main), and the cherry-pick will work.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Nov 22, 2023
@jakebailey jakebailey merged commit 8caae93 into microsoft:main Nov 22, 2023
@jakebailey jakebailey deleted the fix-cherry-pick-unmerged branch November 22, 2023 18:53
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants