update permission from caller#47
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the first-time-pr/README.md consumer documentation to make explicit that the caller workflow must grant pull-requests: write at the job level for the reusable workflow to function. Previously the examples omitted the caller-side permissions: block, which could lead adopters to hit permission failures when the label/comment steps run. I verified every technical claim against the actual reusable workflow (.github/workflows/first-time-pr.yml), which declares pull-requests: write for exactly the gh pr edit --add-label and gh pr comment steps described in the README.
Changes:
- Added job-level
permissions: pull-requests: write(and top-levelpermissions: {}) to both example caller snippets, with inline comments explaining why. - Added a new "Required permissions" section explaining that a reusable workflow's permissions are capped by the caller's grants.
- Added a
zizmor: ignore[dangerous-triggers]inline comment on thepull_request_target:trigger plus a note clarifying it only matters for repos running zizmor.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mx-psi
approved these changes
Jul 8, 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.
Update example on readme to make it clear that the caller needs to add the permission to be able to add the comment and label