Skip to content

Commit

Permalink
GODRIVER-3314 Fix handling of failed cherry-pick (#482)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Aug 30, 2024
1 parent 6b1e892 commit 16cbeae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .evergreen/github_app/backport-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ echo "Creating the cherry-pick..."
old_title=$(git --no-pager log $target_sha --pretty=%B | head -n 1)
title="${old_title} [${target_branch}]"
body="Cherry-pick of $target_sha to $target_branch"
if git cherry-pick -x -m1 $target_sha; then
status=0
git cherry-pick -x -m1 $target_sha || {
status=$?
}
if [ $status == 0 ]; then
# If the cherry-pick succeeds, push the branch and make a PR.
echo "Creating the cherry-pick..."
echo "Creating the PR..."
Expand Down

0 comments on commit 16cbeae

Please sign in to comment.