Skip to content

Commit

Permalink
Merge pull request #17 from NarrativeScience/custom-commit-message-me…
Browse files Browse the repository at this point in the history
…rge-branch

Custom commit message on merge commit
  • Loading branch information
ns-bdesimone authored Nov 16, 2021
2 parents 9415b3c + 58811f8 commit ea132b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2.1
orbs:
# dev version needs to be manually deployed to accurately test commit changes.
# Once deployed, update <alpha> to reflect the version deployed.
ghpr: narrativescience/ghpr@dev:alpha
ghpr: narrativescience/ghpr@dev:1.1.3

commands:
pack-validate:
Expand All @@ -20,7 +20,8 @@ jobs:
test:
machine: true
steps:
- ghpr/build-prospective-branch
- ghpr/build-prospective-branch:
force: true
- ghpr/slack-pr-author:
message: ":tada: Tests passed!"
get_slack_user_by: meseeks
Expand Down
4 changes: 3 additions & 1 deletion src/commands/build-prospective-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ steps:
set +e
git config --global user.email "$GITHUB_EMAIL"
git config --global user.name "$GITHUB_USERNAME"
git fetch && git merge "origin/$GITHUB_PR_BASE_BRANCH" --no-edit
# Merge the branch with no commit and then create a custom commit message contianing the original commit message.
git fetch && git merge "origin/$GITHUB_PR_BASE_BRANCH" --no-commit
git commit -am "Merging ${GITHUB_PR_BASE_BRANCH} into ${CIRCLE_BRANCH}. ${GITHUB_PR_COMMIT_MESSAGE}"
if [[ $? -ne 0 && << parameters.force >> == false ]]; then
echo "Failed to merge $GITHUB_PR_BASE_BRANCH into $CIRCLE_BRANCH"
exit 1
Expand Down

0 comments on commit ea132b3

Please sign in to comment.