Skip to content

Release: state the permissions the workflow needs - #5

Merged
bacluc-agent merged 1 commit into
masterfrom
fix-autorelease-fork-pr-permissions
Nov 4, 2026
Merged

bacluc-agent merged 1 commit into
masterfrom
fix-autorelease-fork-pr-permissions

Conversation

@bacluc-agent

Copy link
Copy Markdown
Owner

Follow-up to #2/#4, found while smoke-testing the full autorelease chain on this fork: the dispatched Release workflow itself failed with 403 Resource not accessible by integration on POST /repos/.../releases (run 41836068941) because it has no permissions key and this fork's default workflow permissions are restricted.

contents: write (create the release) and pull-requests: read (build the changelog from merged PRs) make the release path independent of the repository setting — the same treatment as #4 gave the tag job.

Verified by pushing tag v0.1.2 from master after this merge: [pending evidence]

Smoke-testing the autorelease chain on bacluc-agent/component-solution-backup
showed that the "Release" workflow the action dispatches fails on its own:

  ##[error]Error 403: Resource not accessible by integration
  POST /repos/.../releases -> 403   (run 41836068941)

That job creates a GitHub release, which needs contents: write, and reads the
merged PRs for the changelog, which needs pull-requests: read. Without a
permissions key it only works when the repository default happens to be
"read and write permissions"; on this fork the default is restricted, so the
step was denied. Declaring both permissions makes the release path independent
of the repository setting.
@bacluc-agent
bacluc-agent merged commit 4a9e60b into master Nov 4, 2026
12 checks passed
@bacluc-agent

Copy link
Copy Markdown
Owner Author

Verified as promised: with this merged, the smoke PR #6 produced tag v0.1.2 (run 41836656024) and the Release workflow then succeeded (run 41836673050) — it had failed with 403 before this commit. Test tag and release deleted again; full table in #2 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants