Skip to content

Commit 2e4e2cc

Browse files
joseegman-idoneeajoseegarciaclaude
authored
Grant pull-requests write permission to PR comment workflows (#390)
The PR workflows call thollander/actions-comment-pull-request to post review/build/label comments, but declare no permissions block, so they inherit the repository's default read-only GITHUB_TOKEN and fail with "Resource not accessible by integration" (e.g. the "Pull Request Approved" workflow when a PR is approved). Add a permissions block (contents: read, pull-requests: write) to pr-review.yml, maven-pr.yml and gradle-pr.yml so the comment steps can create/update comments. Co-authored-by: joseegarcia <jose.garcia@disashop.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent f6a830d commit 2e4e2cc

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/gradle-pr.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66

77
concurrency: pr-gradle-${{ github.event.pull_request.id }}
88

9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
913
jobs:
1014
check-version:
1115
runs-on: ubuntu-latest

.github/workflows/maven-pr.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66

77
concurrency: pr-${{ github.event.pull_request.id }}
88

9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
913
jobs:
1014
check-version:
1115
runs-on: ubuntu-latest

.github/workflows/pr-review.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66

77
concurrency: pr-${{ github.event.pull_request.id }}
88

9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
913
jobs:
1014
check-labels:
1115
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)