Skip to content

ci: request workflows permission for the release token - #399

Merged
justinwlin merged 1 commit into
mainfrom
deanq/release-token-workflows
Oct 30, 2026
Merged

justinwlin merged 1 commit into
mainfrom
deanq/release-token-workflows

Conversation

@deanq

@deanq deanq commented Oct 30, 2026

Copy link
Copy Markdown
Member

Follow-up to #398. The probe returned:

HTTP/2.0 422 Unprocessable Entity
X-Accepted-Github-Permissions: contents=write; contents=write,workflows=write

So the release app's token can create releases on this repo, but release-please still failed right after with Resource not accessible by integration.

Likely cause (not yet confirmed)

The 1.21.1 tag covers #395, which edits a workflow file. It is the only commit since v1.21.0 that touches .github/workflows/. GitHub requires the workflows permission for some ref operations over workflow changes, and the header lists contents=write,workflows=write as an accepted set. runpod/host's v2.276.4 release with the same app worked tonight, and its range touched no workflow files.

One fact cuts against it: v1.20.0 and v1.20.1 both included workflow changes and released with this app. The theory holds only if the app had the Workflows permission then and lost it since.

Change

Outcome after merge

  • App has Workflows permission: token creation succeeds and release-please should publish 1.21.1 (tag, release, PyPI).
  • App lacks it: the token step fails and names the missing permission. An org owner then needs to grant Workflows: Read and write to the release app.

Test plan

  • make quality-check passes locally
  • Workflow YAML parses; token step inputs are as listed
  • After merge: Release run on main either publishes 1.21.1 or fails at the token step naming workflows

🤖 Generated with Claude Code

The release-create probe returned 422, so the app token can create
releases, yet release-please still fails with "Resource not accessible
by integration". GitHub listed contents+workflows as an accepted
permission set, and 1.21.1 is the first release since v1.20.1 whose
commits change .github/workflows/ (#395). Request workflows: write
explicitly: if the app has it, the release goes through; if not, token
creation fails and names the missing permission. Removes the probe.
@deanq
deanq requested a review from justinwlin October 30, 2026 01:21
@justinwlin
justinwlin merged commit a81c759 into main Oct 30, 2026
10 checks passed
@justinwlin
justinwlin deleted the deanq/release-token-workflows branch October 30, 2026 02:28
@deanq deanq mentioned this pull request Oct 30, 2026
2 of 4 tasks
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.

3 participants