|
|
@ -51,8 +51,8 @@ function cherry_pick_with_slack_notification { |
|
|
|
local pr_url="$3" |
|
|
|
local pr_url="$3" |
|
|
|
|
|
|
|
|
|
|
|
git checkout "$branch" || exit 1 |
|
|
|
git checkout "$branch" || exit 1 |
|
|
|
# If git cherry-pick fails, we send a failure notification |
|
|
|
# If git cherry-pick fails or it fails to push, we send a failure notification |
|
|
|
if ! git cherry-pick --mainline 1 "$commit"; then |
|
|
|
if ! (git cherry-pick --mainline 1 "$commit" && git push origin "$branch"); then |
|
|
|
status "🍒❌ Cherry pick of commit ${commit:0:7} from $pr_url onto $branch failed!" |
|
|
|
status "🍒❌ Cherry pick of commit ${commit:0:7} from $pr_url onto $branch failed!" |
|
|
|
|
|
|
|
|
|
|
|
# send slack notification |
|
|
|
# send slack notification |
|
|
@ -85,8 +85,6 @@ function cherry_pick_with_slack_notification { |
|
|
|
# Else we send a success notification |
|
|
|
# Else we send a success notification |
|
|
|
else |
|
|
|
else |
|
|
|
status "🍒✅ Cherry picking of PR commit ${commit:0:7} from ${pr_url} succeeded!" |
|
|
|
status "🍒✅ Cherry picking of PR commit ${commit:0:7} from ${pr_url} succeeded!" |
|
|
|
# push changes to the specified branch |
|
|
|
|
|
|
|
git push origin "$branch" |
|
|
|
|
|
|
|
curl -X POST -H 'Content-type: application/json' \ |
|
|
|
curl -X POST -H 'Content-type: application/json' \ |
|
|
|
--data \ |
|
|
|
--data \ |
|
|
|
"{ \ |
|
|
|
"{ \ |
|
|
|