Skip to content

fix(ci): grant pull-requests: write to build-wasm + harden sticky comment#69

Merged
WiktorStarczewski merged 1 commit into
mainfrom
wiktor/auto-patch-comment-perms
Apr 30, 2026
Merged

fix(ci): grant pull-requests: write to build-wasm + harden sticky comment#69
WiktorStarczewski merged 1 commit into
mainfrom
wiktor/auto-patch-comment-perms

Conversation

@WiktorStarczewski
Copy link
Copy Markdown
Collaborator

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.

  • build.yml: grant pull-requests: write to build-wasm only (scoped, principle of least privilege)
  • inject-linked-client-pr action: continue-on-error: true on the sticky-comment steps so a comment failure can never break the build

…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.
@WiktorStarczewski WiktorStarczewski added the no changelog PR doesn't need a CHANGELOG entry (trivial / non-user-visible) label Apr 30, 2026
@WiktorStarczewski WiktorStarczewski merged commit 163bbec into main Apr 30, 2026
22 of 23 checks passed
@WiktorStarczewski WiktorStarczewski deleted the wiktor/auto-patch-comment-perms branch April 30, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog PR doesn't need a CHANGELOG entry (trivial / non-user-visible)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant