Skip to content

Commit aaa7ef6

Browse files
ci: grant pull-requests:write to openapi-validation job
The job uses actions/github-script to post a PR comment with spec validation info, but failed with HTTP 403 "Resource not accessible by integration" because the default GITHUB_TOKEN permissions for the workflow were read-only. Scope the new permissions to this job only (least privilege) and keep `contents: read` for checkout — adding a `permissions:` block implicitly drops all other defaults to none.
1 parent 8a663c0 commit aaa7ef6

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ jobs:
127127
openapi-validation:
128128
name: OpenAPI Validation
129129
runs-on: ubuntu-latest
130+
permissions:
131+
contents: read
132+
pull-requests: write
130133

131134
steps:
132135
- name: Checkout code

0 commit comments

Comments
 (0)