From 92f64c272f7a8c3c2b243025514466dd09cfa180 Mon Sep 17 00:00:00 2001 From: Falk Puschner Date: Thu, 9 Nov 2023 16:25:37 +0100 Subject: [PATCH] :art: Force automerge as admin --- .github/workflows/template_automerge_dependabot.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/template_automerge_dependabot.yml b/.github/workflows/template_automerge_dependabot.yml index e2c1d3e7..cf4457fc 100644 --- a/.github/workflows/template_automerge_dependabot.yml +++ b/.github/workflows/template_automerge_dependabot.yml @@ -3,6 +3,11 @@ name: Dependabot Auto-Merge on: workflow_call: + inputs: + admin: + default: 'false' + required: false + type: boolean secrets: app_id: required: true @@ -35,7 +40,12 @@ jobs: if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' run: | gh pr review --approve "$PR_URL" - gh pr merge --auto --merge "$PR_URL" + + if [ ${{ inputs.admin }} == 'true' ]; then + gh pr merge "$PR_URL" --merge --admin + else + gh pr merge --auto --merge "$PR_URL" + fi env: PR_URL: ${{ github.event.pull_request.html_url }} GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}