From afcfdec7dea7f77bab8bdb3eb7a1254af7171b9f Mon Sep 17 00:00:00 2001 From: Tibo B <19124383+ingvaar@users.noreply.github.com> Date: Fri, 2 Feb 2024 18:33:21 +0100 Subject: [PATCH] feat(automerge): simplify command logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sören Mothes --- .github/workflows/template_automerge_dependabot.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/template_automerge_dependabot.yml b/.github/workflows/template_automerge_dependabot.yml index c0548e17..03e666ee 100644 --- a/.github/workflows/template_automerge_dependabot.yml +++ b/.github/workflows/template_automerge_dependabot.yml @@ -50,12 +50,14 @@ jobs: MERGE_COMMAND="gh pr merge \"$PR_URL\"" - if [ "${{ inputs.force }}" == 'true' ] && [ "${{ inputs.rebase }}" == 'true' ]; then - MERGE_COMMAND+=" --rebase --admin" - elif [ "${{ inputs.force }}" == 'true' ]; then - MERGE_COMMAND+=" --squash --admin" - elif [ "${{ inputs.rebase }}" == 'true' ]; then + if [ "${{ inputs.rebase }}" == 'true' ]; then MERGE_COMMAND+=" --rebase" + else + MERGE_COMMAND+=" --squash" + fi + if [ ${{ inputs.force }} == 'true' ]; then + MERGE_COMMAND+=" --admin" + fi else MERGE_COMMAND+=" --auto --merge" fi