Skip to content

Commit 7e81412

Browse files
Grant actions: read so the gate can list its own workflow's jobs
fetchCurrentWorkflowCheckRunIds() calls GET /actions/runs/{run_id}/jobs to map the current workflow run's jobs to their corresponding check-run IDs, which is what lets waitForChecksToSettle() ignore its own check run when deciding whether 'other' checks are pending. Once a workflow declares an explicit permissions block, every scope not listed defaults to 'none'. The block listed checks/contents/ pull-requests but omitted actions, so GITHUB_TOKEN would 403 against the Actions Jobs API and the gate would error out before reaching its fail-closed Anthropic decision. Add 'actions: read' with an explanatory comment so the dependency is documented at the permission site. Co-authored-by: Jonathan Kingston <jonathanKingston@users.noreply.github.com>
1 parent fc55234 commit 7e81412

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/dependabot-auto-merge.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ on:
55
types: [opened, reopened, synchronize, ready_for_review]
66

77
permissions:
8+
# `actions: read` is required so the gate script can call
9+
# `GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs` to exclude its own
10+
# workflow run from the wait set in `fetchCurrentWorkflowCheckRunIds()`.
11+
# Once explicit permissions are set, anything not listed defaults to
12+
# `none`, so omitting this would 403 before the gate ever runs.
13+
actions: read
814
checks: read
915
contents: write
1016
pull-requests: write

0 commit comments

Comments
 (0)