Skip to content

ci(release): open Release PR with org App token, not GITHUB_TOKEN#23

Open
ALLiDoizCode wants to merge 1 commit into
mainfrom
fix/release-app-token
Open

ci(release): open Release PR with org App token, not GITHUB_TOKEN#23
ALLiDoizCode wants to merge 1 commit into
mainfrom
fix/release-app-token

Conversation

@ALLiDoizCode

Copy link
Copy Markdown
Contributor

Problem

The Release workflow uses changesets/action, which opens a "Version Packages" PR with the default GITHUB_TOKEN. The org has "Allow GitHub Actions to create and approve pull requests" disabled, so this fails with:

GitHub Actions is not permitted to create or approve pull requests.

The policy is enforced org-wide and cannot be overridden per-repo; the workflow's pull-requests: write grant is not sufficient. This already broke toon's release (toon-protocol/toon#27); this repo has the identical workflow and will fail the same way on its next pending changeset.

Fix

Mint the org GitHub App token (APP_ID/APP_PRIVATE_KEY) and pass it to changesets/action as GITHUB_TOKEN — the same pattern the org's decomposer/executor loops use. A GitHub App is a distinct actor, so its PRs are not subject to the Actions PR-creation policy.

continue-on-error: true on the token step preserves a GITHUB_TOKEN fallback so the publish path still works if the App is ever uninstalled.

No org-admin change required.

🤖 Generated with Claude Code

The org disables "Allow GitHub Actions to create and approve pull
requests", so changesets/action cannot open the Version Packages PR with
the default GITHUB_TOKEN (it fails with "GitHub Actions is not permitted
to create or approve pull requests"). The policy is org-level and cannot
be overridden per-repo; pull-requests: write is not sufficient.

Mirror the org's decomposer/executor loops: mint the org App token
(APP_ID/APP_PRIVATE_KEY) and pass it to changesets/action as
GITHUB_TOKEN. An App is a distinct actor, so its PRs are exempt.
continue-on-error keeps a GITHUB_TOKEN fallback for the publish path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant