From 07b5d0b5c7428dc19ec1c90c4d4c010828e39b55 Mon Sep 17 00:00:00 2001 From: "Adams P. D." <57180807+adamspd@users.noreply.github.com> Date: Mon, 29 Jun 2026 12:13:15 +0200 Subject: [PATCH] Update auto-accept-dependabot.yml Signed-off-by: Adams P. D. <57180807+adamspd@users.noreply.github.com> --- .github/workflows/auto-accept-dependabot.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-accept-dependabot.yml b/.github/workflows/auto-accept-dependabot.yml index 02f6f68..40cce51 100644 --- a/.github/workflows/auto-accept-dependabot.yml +++ b/.github/workflows/auto-accept-dependabot.yml @@ -1,7 +1,7 @@ name: auto-accept-dependabot on: - pull_request: + pull_request_target: types: [opened, synchronize, reopened] permissions: @@ -13,10 +13,25 @@ jobs: if: github.actor == 'dependabot[bot]' runs-on: ubuntu-latest steps: + - name: Debug auth source (non-sensitive) + run: | + if [ -n "${{ secrets.AUTO_MERGE_TOKEN }}" ]; then + echo "GH auth source: secrets.AUTO_MERGE_TOKEN" + elif [ -n "${{ secrets.GITHUB_TOKEN }}" ]; then + echo "GH auth source: secrets.GITHUB_TOKEN" + elif [ -n "${{ github.token }}" ]; then + echo "GH auth source: github.token" + else + echo "::error::No token available for gh CLI" + exit 1 + fi + echo "Actor: ${{ github.actor }}" + echo "Event: ${{ github.event_name }}" + - name: Approve and Enable Auto-Merge run: | gh pr review --approve "$PR_URL" gh pr merge --auto --squash "$PR_URL" env: PR_URL: ${{ github.event.pull_request.html_url }} - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.AUTO_MERGE_TOKEN || secrets.GITHUB_TOKEN || github.token }}