From 57aec0edd07006730115f8bfc6c959f97f51c223 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 6 Dec 2026 05:35:03 +0000 Subject: [PATCH] fix(ci): run Dependabot workflows on pull_request instead of pull_request_target GitHub now blocks pull_request_target in public repositories by default (enforced since 2026-12-02), so these workflows ended in startup_failure on every PR. Dependabot's own branches still get a write token on pull_request through the workflow's permissions key. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01XkZEiTAg2KWVn8Y5ARmddv --- .github/workflows/dependabot-reminders.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dependabot-reminders.yml b/.github/workflows/dependabot-reminders.yml index 055363b..e92e9d1 100644 --- a/.github/workflows/dependabot-reminders.yml +++ b/.github/workflows/dependabot-reminders.yml @@ -2,13 +2,16 @@ # needs (files Dependabot can't change, hardware checks, release side effects). # The rules live in .github/scripts/dependabot-reminders.js. # -# Runs on pull_request_target so the token can comment on Dependabot PRs. It -# only checks out the base branch and reads the PR's file list through the API; -# never check out or run the PR's code here. +# Runs on pull_request, not pull_request_target: GitHub blocks +# pull_request_target in public repos by default. For Dependabot's own +# branches the `permissions` below still give the token write access to post +# the comment (fork PRs get a read-only token, but the job skips them anyway). +# It only checks out the base commit and reads the PR's file list through the +# API; never check out or run the PR's code here. name: Dependabot reminders on: - pull_request_target: + pull_request: types: [opened, synchronize, reopened] permissions: @@ -20,9 +23,10 @@ jobs: if: github.event.pull_request.user.login == 'dependabot[bot]' runs-on: ubuntu-latest steps: - # The base branch, so the rules come from main and not from the PR. + # The base commit, so the rules come from main and not from the PR. - uses: actions/checkout@v7 with: + ref: ${{ github.event.pull_request.base.sha }} sparse-checkout: .github/scripts persist-credentials: false