diff --git a/skyrat/tools/merge-upstream-pull-request.sh b/skyrat/tools/merge-upstream-pull-request.sh index 7803fe7a3d1..023e9e24730 100755 --- a/skyrat/tools/merge-upstream-pull-request.sh +++ b/skyrat/tools/merge-upstream-pull-request.sh @@ -78,6 +78,8 @@ if echo "$CHERRY_PICK_OUTPUT" | grep -i 'error: mainline was specified but commi # Add all files onto this branch git add -A . git -c core.editor=true cherry-pick --continue + # Prune any possible mentions from the commit message. + git commit -m "$(git -c core.editor=true log -1 --pretty=%B | sed 's/@/@ /g')" --amend done else echo "Cherry-picking: $MERGE_SHA" @@ -85,17 +87,24 @@ if echo "$CHERRY_PICK_OUTPUT" | grep -i 'error: mainline was specified but commi # Add all files onto this branch git add -A . git -c core.editor=true cherry-pick --continue + # Prune any possible mentions from the commit message. + git commit -m "$(git -c core.editor=true log -1 --pretty=%B | sed 's/@/@ /g')" --amend fi else # Add all files onto this branch echo "Adding files to branch:" git add -A . + # Prune any possible mentions from the commit message. + git commit -m "$(git -c core.editor=true log -1 --pretty=%B | sed 's/@/@ /g')" --amend fi # Commit these changes echo "Commiting changes" git -c core.editor=true commit --allow-empty -m "$2" +# Prune any possible mentions from the commit message. +git commit -m "$(git -c core.editor=true log -1 --pretty=%B | sed 's/@/@ /g')" --amend + # Push them onto the branch echo "Pushing changes" git push -u origin "$BASE_BRANCH_NAME$1"