From 9365582d4783a3b1b32fe98b52452aefec9d63ec Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Thu, 7 Nov 2024 16:44:17 +1100 Subject: [PATCH] Add ADMIN_ACCESS (#131) --- actions/commit_pr_and_merge/action.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/actions/commit_pr_and_merge/action.yaml b/actions/commit_pr_and_merge/action.yaml index b0d79013..1cc74e2d 100644 --- a/actions/commit_pr_and_merge/action.yaml +++ b/actions/commit_pr_and_merge/action.yaml @@ -17,6 +17,11 @@ inputs: description: The base branch we want to merge into type: string default: '' + admin_access: + description: Allow merging PR with `--admin` flag + type: boolean + required: false + default: false outputs: git_tag_or_hash: description: The git tag (or hash if no tag provided) of the merge commit @@ -66,13 +71,14 @@ runs: core.setOutput('pull-request-number', newPr.number); - name: Merge PR - run: gh pr merge $PR_URL --delete-branch $MERGE_PR_STRATEGY + run: gh pr merge $PR_URL --delete-branch $MERGE_PR_STRATEGY $ADMIN_ACCESS if: steps.changes.outputs.changes_exist == 'true' shell: bash env: GITHUB_TOKEN: ${{ github.token }} PR_URL: ${{ steps.create-pr.outputs.pull-request-url }} MERGE_PR_STRATEGY: ${{github.ref_protected == true && '--merge' || '--rebase' }} + ADMIN_ACCESS: ${{ inputs.admin_access == true && '--admin' || '' }} - name: Tag commit uses: actions/github-script@v7