Skip to content

Commit 24ca2df

Browse files
authored
fix: add missing issues:write permission for PR autolabeler (#20)
The reusable workflow (commit-check/.github/.github/workflows/pr-labeler.yml) requires 'issues: write' permission because the release-drafter autolabeler uses the Issues API to set labels on PRs. When a caller invokes a reusable workflow with 'permissions: {}' at the top level and only 'pull-requests: write' + 'contents: read' at the job level, 'issues' defaults to 'none'. The reusable workflow cannot escalate its permissions beyond what the caller grants, causing a startup_failure. This adds 'issues: write' to the caller job-level permissions so the reusable workflow's GITHUB_TOKEN can create PR labels.
1 parent 069f7f3 commit 24ca2df

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

.github/workflows/labeler.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ jobs:
1111
draft-release:
1212
permissions:
1313
pull-requests: write
14+
issues: write
1415
contents: read
1516
uses: commit-check/.github/.github/workflows/pr-labeler.yml@main

0 commit comments

Comments
 (0)