Skip to content

Commit

Permalink
fix(automerge): Fix command building
Browse files Browse the repository at this point in the history
  • Loading branch information
wmentzel committed Mar 10, 2024
1 parent f394e5b commit 6f9a65e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/template_automerge_dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,28 @@ jobs:
run: |
gh pr review --approve "$PR_URL"
MERGE_OPTIONS=''
MERGE_OPTIONS=()
case "$strategy" in
"rebase")
MERGE_OPTIONS+=" --rebase"
;;
MERGE_OPTIONS+=("--rebase")
;;
"merge")
MERGE_OPTIONS+=" --merge"
;;
MERGE_OPTIONS+=("--merge")
;;
*)
MERGE_OPTIONS+=" --squash"
;;
MERGE_OPTIONS+=("--squash")
;;
esac
if [ "$force" == 'true' ]; then
MERGE_OPTIONS+=" --admin"
MERGE_OPTIONS+=("--admin")
else
MERGE_OPTIONS+=" --auto"
MERGE_OPTIONS+=("--auto")
fi
echo "Executing merge command with the options: '${MERGE_OPTIONS}'"
gh pr merge "$PR_URL" "${MERGE_OPTIONS}"
echo "Executing merge command with the options: '${MERGE_OPTIONS[*]}'"
gh pr merge "$PR_URL" "${MERGE_OPTIONS[@]}"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}

0 comments on commit 6f9a65e

Please sign in to comment.