ci: support cherry-picking of merge PRs

This change assumes that it is always safe to use the first commit
parent as the mainline. I believe this assumption is safe with a
github merge workflow.
This commit is contained in:
Daniel Nephin 2020-03-18 12:38:04 -04:00
parent 1ff9b748ae
commit 887e410cd6
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ function cherry_pick_with_slack_notification {
git checkout $branch || exit 1
# If git cherry-pick fails, we send a failure notification
if ! git cherry-pick $commit; then
if ! git cherry-pick --mainline 1 $commit; then
status "🍒❌ Cherry pick of commit ${commit:0:7} from $pr_url onto $branch failed!"
curl -X POST -H 'Content-type: application/json' \
--data \