Skip to content

Commit 0b64245

Browse files
committed
updated github_pull_request_create.sh
1 parent afe3f73 commit 0b64245

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

github/github_pull_request_create.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,12 @@ if [ "$total_commits" -gt 0 ]; then
179179
fi
180180
if [ "$GITHUB_PULL_REQUEST_AUTO_MERGE" = true ]; then
181181
pr_url="$(get_pr_url)"
182-
# do not quote as supplying unexpected empty args would likely break command
183-
# shellcheck disable=SC2086
184-
gh pr merge "$pr_url" --auto ${GITHUB_PULL_REQUEST_SQUASH:+--squash} ${GITHUB_PULL_REQUEST_SQUASH:---merge}
182+
# not supporting Rebase on purpose - see https://medium.com/@harisekhon/the-evils-of-git-rebasing-beec34a607c7
183+
merge_type="--merge"
184+
if [ "${GITHUB_PULL_REQUEST_SQUASH:-}" = true ]; then
185+
merge_type="--squash"
186+
fi
187+
gh pr merge "$pr_url" --auto "$merge_type"
185188
fi
186189
echo >&2
187190
else

0 commit comments

Comments
 (0)