From 887e410cd6e4c0859b20d213df6966f7117ed9d2 Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Wed, 18 Mar 2020 12:38:04 -0400 Subject: [PATCH] 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. --- .circleci/scripts/cherry-picker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/scripts/cherry-picker.sh b/.circleci/scripts/cherry-picker.sh index f5aa8f0482..7e6f2f3772 100755 --- a/.circleci/scripts/cherry-picker.sh +++ b/.circleci/scripts/cherry-picker.sh @@ -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 \