docs(readme): document required permissions + concurrency recommendation#8
Merged
Conversation
Add a Workflow setup section covering minimum GITHUB_TOKEN scopes (contents:read, pull-requests:write, statuses:write) so callers stop copying issues:write defensively, and the cancel-in-progress concurrency pattern with a note on how it composes with backend supersession. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
On deployment_status events github.head_ref is empty and github.ref falls back to the deployment SHA — the default snippet would give every commit its own concurrency group and silently break supersession. Add a callout with the deployment.ref variant. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
GITHUB_TOKENscopes (contents:read,pull-requests:write,statuses:write) and explicitly call out thatissues:writeis not needed — PR comments are served by the issue-comments endpoint but token-scope-wisepull-requests:writealready covers them. Also notes which scopes can be dropped underskip-comment/skip-status.cancel-in-progress: truepattern and explain how it composes with backend supersession (covers both "cancelled before a run was created" and "cancelled mid-run" — the next workflow's API call marks the older runsuperseded, which the action already handles as a terminal state).Motivation
Triggered by external review feedback on a downstream caller workflow (sanity-io/cli#1088) where callers were over-granting
issues:writedefensively and skippingconcurrencyfor fear of breaking supersession. Both are documentation gaps on our side — no functional changes to the action.Test plan
Inputstable.🤖 Generated with Claude Code