Skip to content

Commit f403f6f

Browse files
zkoppertCopilot
andauthored
Fix README: Add pull-requests write permission (#9)
The action posts PR comments when ENABLE_PR_COMMENTS is enabled, which requires pull-requests: write permission. Updated: - GitHub App permissions table to clarify Read and Write needed - PAT description to include pull requests write access - All workflow examples to include pull-requests: write permission - All workflow examples to include issues: write permission This ensures users grant the correct permissions for all features (issue creation and PR commenting) to work properly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 67d126b commit f403f6f

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ This action can be configured to authenticate with GitHub App Installation or Pe
7676

7777
The required GitHub App permissions under `Repository permissions` are:
7878

79-
- `Pull Requests` - Read (needed to scan open pull requests and their changed files)
79+
- `Pull Requests` - Read and Write (Read: scan open pull requests and their changed files; Write: post PR comments when `ENABLE_PR_COMMENTS` is enabled)
8080
- `Contents` - Read (needed to fetch file diffs and line ranges)
8181
- `Issues` - Read and Write (needed to create conflict report issues)
8282

8383
##### Personal Access Token (PAT)
8484

8585
| field | required | default | description |
8686
| ---------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
87-
| `GH_TOKEN` | True | `""` | The GitHub Token used to scan repositories. Must have read access to pull requests and contents, and write access to issues for all repositories in scope. |
87+
| `GH_TOKEN` | True | `""` | The GitHub Token used to scan repositories. Must have read access to pull requests and contents, and write access to issues and pull requests for all repositories in scope. |
8888

8989
#### Other Configuration Options
9090

@@ -123,6 +123,8 @@ on:
123123

124124
permissions:
125125
contents: read
126+
issues: write
127+
pull-requests: write
126128

127129
jobs:
128130
detect-conflicts:
@@ -149,6 +151,8 @@ on:
149151

150152
permissions:
151153
contents: read
154+
issues: write
155+
pull-requests: write
152156

153157
jobs:
154158
detect-conflicts:
@@ -173,6 +177,8 @@ on:
173177

174178
permissions:
175179
contents: read
180+
issues: write
181+
pull-requests: write
176182

177183
jobs:
178184
detect-conflicts:
@@ -203,6 +209,8 @@ on:
203209
204210
permissions:
205211
contents: read
212+
issues: write
213+
pull-requests: write
206214
207215
jobs:
208216
detect-conflicts:

0 commit comments

Comments
 (0)