fix(ci): grant pull-requests: write to build-wasm + harden sticky comment#69
Merged
Merged
Conversation
…ment
The auto-patch action's parse + Cargo.toml-rewrite steps succeed, but
the sticky-comment step fails with 'Resource not accessible by
integration' because build.yml only declares contents: read at the
workflow level. The error short-circuits the composite action and the
build job fails before cargo even runs.
Two-part fix:
build.yml -> grant pull-requests: write to the build-wasm job only.
Scoped to that job (rather than at the workflow level) so every
other job keeps the read-only default. Principle of least privilege:
only the comment-poster needs the write.
inject-linked-client-pr/action.yml -> mark the sticky-comment steps
(both upsert and delete) as continue-on-error: true. The comment is
decorative — if write permissions ever go missing again, or if the
sticky-comment marketplace action has a transient blip, we shouldn't
abort the rewrite step's gains. The patch is already on disk at the
point those steps run.
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.
Followup to #67. The auto-patch action's parse + rewrite steps succeed, but the sticky-comment step fails with 'Resource not accessible by integration' because build.yml's permissions are read-only. The error short-circuits the composite action and the build job fails before cargo runs.
pull-requests: writeto build-wasm only (scoped, principle of least privilege)continue-on-error: trueon the sticky-comment steps so a comment failure can never break the build