Fix the permissions in the automatic labeler#3029
Conversation
Signed-off-by: Przemek Tredak <ptredak@nvidia.com>
Greptile SummaryThis PR fixes the automatic PR labeler by adding
Confidence Score: 4/5Safe to merge — the change is confined to a single permission line in a CI workflow and the workflow does not execute any code from the incoming PR. The fix is straightforward and clearly addresses the root cause. Two minor follow-up questions exist: whether .github/workflows/community_label.yml — worth confirming whether Important Files Changed
|
| contents: read | ||
| issues: write | ||
| pull-requests: write |
There was a problem hiding this comment.
issues: write may be redundant with this fix
The workflow only calls issues.addLabels on existing labels — it never creates new labels. The PR description states issues: write is "needed to create new labels," but no label creation happens here. If pull-requests: write is now the permission that enables addLabels on PR objects (as this fix implies), issues: write may be unnecessary and could be dropped to keep the token scope minimal.
Description
Added the permission to write to the pull requests, since that is what is needed to add the existing label to a PR, rather than the issue: write, which is needed to create the new labels.
Type of change