Add issues:write to PR Format Check job permissions#66
Merged
Conversation
PR conversation comments use the Issues API (/issues/comments), so the reusable workflow job needs issues:write in addition to pull-requests:write. Also adds explicit contents:read for least-privilege.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the shared PR Format Check GitHub Actions workflow to ensure it has the correct token scopes to create/update/delete PR conversation comments via the Issues API while keeping permissions least-privilege.
Changes:
- Add
issues: writetopr-lintjob permissions to supportgh api ... /issues/.../commentsoperations. - Add explicit
contents: readtopr-lintjob permissions.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
apattu200
approved these changes
Jul 13, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Adds
issues: writeand explicitcontents: readto thepr-lintjob permissions in the shared PR Format Check workflow.Why
PR conversation comments are created/updated/deleted via the Issues API (
/repos/{o}/{r}/issues/comments). To be robust, the job needsissues: writein addition topull-requests: write. This resolves a reviewer concern thatpull-requests: writealone may be insufficient for the comment operations.Least-privilege final set:
Files changed
.github/workflows/pr-lint.yml