From 4c6585de7a868221e7a3d1434043f33b544e4cad Mon Sep 17 00:00:00 2001 From: LetterJay Date: Tue, 5 Sep 2017 20:11:43 -0500 Subject: [PATCH] Update merge-upstream-pull-request.sh --- citadel/tools/merge-upstream-pull-request.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/citadel/tools/merge-upstream-pull-request.sh b/citadel/tools/merge-upstream-pull-request.sh index 3c140dd56c..1e3408dea3 100755 --- a/citadel/tools/merge-upstream-pull-request.sh +++ b/citadel/tools/merge-upstream-pull-request.sh @@ -69,9 +69,10 @@ git checkout -b "$BASE_BRANCH_NAME$1" readonly MERGE_SHA=$(curl --silent "$BASE_PULL_URL/$1" | jq '.merge_commit_sha' -r) # Get the commits -readonly COMMITS=$(curl "$BASE_PULL_URL/$1/commits" | jq '.[].sha' -r) +readonly COMMITS=$(curl --silent "$BASE_PULL_URL/$1/commits" | jq '.[].sha' -r) # Cherry pick onto the new branch +echo "Cherry picking onto branch" CHERRY_PICK_OUTPUT=$(git cherry-pick -m 1 "$MERGE_SHA" 2>&1) echo "$CHERRY_PICK_OUTPUT" @@ -94,14 +95,16 @@ if echo "$CHERRY_PICK_OUTPUT" | grep -i 'error: mainline was specified but commi git add -A . git cherry-pick --continue fi - else # Add all files onto this branch + echo "Adding files to branch:" git add -A . fi # Commit these changes +echo "Commiting changes" git commit --allow-empty -m "$2" # Push them onto the branch +echo "Pushing changes" git push -u origin "$BASE_BRANCH_NAME$1"