Commit 146ba6d
fix(gh-workflow): skip issue comment labeling on pull requests (#7086)
`issue_comment` fires for pull requests as well as issues. The
pending-maintainer-response step had no pull request guard, so every
community comment on an open pull request tried to label it and failed
with `Resource not accessible by integration (addLabelsToLabelable)`,
the job only requests `issues: write`.
Guard the job rather than granting `pull-requests: write`. These labels
are issue triage state: they are applied by the `issues` events in
label-new-issues.yml and removed by issue-closed.yml, neither of which
fires for pull requests, so a labeled pull request would keep the label
after being merged.
Co-authored-by: Michael Sober <msober@amazon.com>1 parent 39b6706 commit 146ba6d
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
15 | 21 | | |
16 | 22 | | |
17 | 23 | | |
| |||
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
25 | | - | |
| 31 | + | |
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
| |||
0 commit comments