Skip to content

Commit

Permalink
post-checkout: ensure non-interactive merge
Browse files Browse the repository at this point in the history
Similar to #12, but does not use export and uses "--no-edit" flag to
ensure that editor is not brought up.

Before, failed (sometimes) with the following error:
error: Terminal is dumb, but EDITOR unset
I cannot make out the necessary or sufficient condition to trigger this
error. We had this work a couple times. It broke on a branch which had
merges itself (but would apply cleanly).
  • Loading branch information
timn committed Oct 9, 2018
1 parent 0389d0b commit de04fc7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hooks/post-checkout
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ function merge() {

git fetch -v origin "${target_branch}"
git checkout FETCH_HEAD
GIT_COMMITTER_NAME="github-merged-pr-buildkite-plugin" git merge "${BUILDKITE_COMMIT}"
GIT_COMMITTER_EMAIL="auto-merge@buildkite" \
GIT_AUTHOR_NAME="github-merged-pr-buildkite-plugin" \
GIT_COMMITTER_NAME="github-merged-pr-buildkite-plugin" \
git merge --no-edit "${BUILDKITE_COMMIT}"
}

force_merge="${GITHUB_MERGED_PR_FORCE_BRANCH:-}"
Expand Down

0 comments on commit de04fc7

Please sign in to comment.