Skip to content

Commit 569b896

Browse files
authored
Merge pull request #19 from NarrativeScience/custom-commit-message-merge-branch-3
Move force logic after merge not commit
2 parents eea6a82 + b4d1b92 commit 569b896

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2.1
33
orbs:
44
# dev version needs to be manually deployed to accurately test commit changes.
55
# Once deployed, update <alpha> to reflect the version deployed.
6-
ghpr: narrativescience/ghpr@dev:1.1.4
6+
ghpr: narrativescience/ghpr@dev:1.1.5
77

88
commands:
99
pack-validate:

src/commands/build-prospective-branch.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,12 @@ steps:
2424
git config --global user.name "$GITHUB_USERNAME"
2525
# Merge the branch with no commit and then create a custom commit message contianing the original commit message.
2626
git fetch && git merge "origin/$GITHUB_PR_BASE_BRANCH" --no-commit
27-
git commit -am "Merging ${GITHUB_PR_BASE_BRANCH} into ${CIRCLE_BRANCH}. ${GITHUB_PR_COMMIT_MESSAGE}"
2827
if [[ $? -ne 0 && << parameters.force >> == false ]]; then
2928
echo "Failed to merge $GITHUB_PR_BASE_BRANCH into $CIRCLE_BRANCH"
3029
exit 1
3130
fi
31+
git commit -am "Merging ${GITHUB_PR_BASE_BRANCH} into ${CIRCLE_BRANCH}. ${GITHUB_PR_COMMIT_MESSAGE}"
32+
if [[ $? -ne 0 ]]; then
33+
echo "Commmit failed... nothing to commit...Continue anyway."
34+
exit 0
35+
fi

0 commit comments

Comments
 (0)