Commit 6cdf883
committed
ci: post reviewers via REST instead of
`gh pr edit --add-reviewer` runs a GraphQL query that touches team
login/name/slug fields, all of which require read:org. Our tokens
have repo+workflow but not read:org, so the step fails with "Your
token has not been granted the required scopes."
Switch to POST /repos/{owner}/{repo}/pulls/{n}/requested_reviewers,
which only writes and works with the existing pull-requests:write
scope. Send team_reviewers (bare slug, not org/slug) and reviewers in
separate arrays, each chunked to 15.
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>gh pr edit
1 parent 2baff41 commit 6cdf883
1 file changed
Lines changed: 21 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
147 | 149 | | |
148 | 150 | | |
149 | | - | |
150 | 151 | | |
151 | | - | |
| 152 | + | |
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
163 | 173 | | |
0 commit comments