docs: note contents:read requirement in pr-labeler-reusable header#16
Merged
Merged
Conversation
mikewalters-truffle
approved these changes
Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Update the header comment in
pr-labeler-reusable.ymlto reflect what callers actually need to grant. It previously saidCallers must grant: pull-requests: write, which is now incomplete: the labeler also reads CODEOWNERS via the Contents API to computedomain/*labels, which requirescontents: read. Since a declaredpermissions:block sets unlisted scopes tonone, a caller granting onlypull-requests: writesilently disables domain labeling.Also refreshes the stale "size/risk/checkbox" description to "size/risk/template/domain" (the template moved to
yes/no; checkbox is now only a parsing fallback).Comment-only change; no behavior change. Addresses review feedback on trufflesecurity/slack-integration-service#581.
Review guidance
.github/workflows/pr-labeler-reusable.ymlTesting
Comment-only; no runtime impact. The matching caller-permission change (
contents: read) is being merged per consumer repo (e.g. slack-integration-service#581), and the operator docs are updated in trufflesecurity/.github-private#11.Deployment notes
None -- comment-only.
Note
Low Risk
Comment-only documentation in a workflow file; no runtime or permission behavior changes in this repo.
Overview
Updates the header comment on PR Labeler (Reusable) so caller permission requirements match current behavior—no workflow logic changes.
The comment now says callers must grant
contents: read(to read CODEOWNERS fordomain/*labels) in addition topull-requests: write, and explains that omittingcontents: readwhen declaringpermissions:can silently break domain labeling. It also renames the described scope from “size/risk/checkbox” to size/risk/template/domain, aligned with how the labeler works today.Reviewed by Cursor Bugbot for commit 0339048. Bugbot is set up for automated code reviews on this repo. Configure here.