From 6f9a65eead1a1805d2f5c136a80c8f9932d0498c Mon Sep 17 00:00:00 2001 From: Willi Mentzel Date: Sun, 10 Mar 2024 20:16:07 +0100 Subject: [PATCH] fix(automerge): Fix command building --- .../template_automerge_dependabot.yml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/template_automerge_dependabot.yml b/.github/workflows/template_automerge_dependabot.yml index 28429b08..c9d49586 100644 --- a/.github/workflows/template_automerge_dependabot.yml +++ b/.github/workflows/template_automerge_dependabot.yml @@ -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 }}