ci(release): use app token for release PR updates#896
Merged
Conversation
Contributor
There was a problem hiding this comment.
LGTM. Right diagnosis, right fix: GITHUB_TOKEN-authored pushes don't trigger downstream pull_request workflows, so release-please PRs were sitting blocked on required contexts that never started. Threading an App installation token through both the action and the pre-normalize checkout is the documented escape hatch.
Things I checked
- Token flows through both the release-please-action step (
release-please.yml:26) and the pre-normalizeactions/checkout@v6(release-please.yml:34) — the two paths that actually push to the release PR branch. - Second checkout for the PyPI publish path (
release-please.yml:71) intentionally uses the default token. Fine — it only reads, never pushes. - Workflow-level
permissions:block (release-please.yml:14-16) is unchanged and still correct; the App's own installation permissions are what governs the release-please push now. - Commit message uses
ci(release):— no semver impact, matches conventional-commits. src/and tests are untouched; no public API surface to audit.
Follow-ups (non-blocking — file as issues)
- Verified-bot commit email format.
release-please.yml:75-76setsaao-ipr-bot[bot]@users.noreply.github.com. For the commit to verify against the App's identity, the noreply form needs the numeric-ID prefix:<APP_USER_ID>+aao-ipr-bot[bot]@users.noreply.github.com(mirrors the previous41898282+github-actions[bot]@…shape). Without the prefix, normalize commits will show as unverified. The numeric ID is onGET /users/aao-ipr-bot%5Bbot%5D. - Undocumented
IPR_APP_ID/IPR_APP_PRIVATE_KEYfor forks.RELEASING.mdandPYPI_SETUP.mdonly mentionPYPY_API_TOKEN. A fork that copies this workflow will hit an opaquecreate-github-app-tokenfailure at theMint App tokenstep. Either add an App-setup section toRELEASING.mdor fall back toGITHUB_TOKENwhen the secret is empty (if: \${{ secrets.IPR_APP_ID != '' }}on the mint step + conditionaltoken:inputs). Falls under the same documented pattern asai-review.yml/ipr-agreement.yml. - Normalize step gates on
prs_created == 'true'(release-please.yml:36). A subsequent push tomainthat updates an existing release PR will setprs_updated, notprs_created, and the normalization will be skipped. release-please regeneratespyproject.tomlon updates, so the unnormalized version can land on the PR until the next created-cycle. Consider widening the gate to also coverprs_updated. - Branch-protection allowlists. Identity flip from
github-actions[bot]toaao-ipr-bot[bot]will fail-closed if any "Restrict who can push" list onmainor the release branch still names only the old identity. Can't verify from the tree — confirm in repo settings before this merges into production traffic.
Minor nits (non-blocking)
- Unused mint on publish-only dispatch.
Mint App token(release-please.yml:25) runs unconditionally, but the next step is gated byif: github.event_name != 'workflow_dispatch' || inputs.publish != true. On a publish-onlyworkflow_dispatch, the token is issued and never used. Mirror the sameif:on the mint step if you want to skip the wasted issuance.
Approving on the strength of the token threading and the unchanged publish path. Verified-commit email is the one that's worth a quick follow-up.
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.
Summary\n- mint an IPR GitHub App installation token in the Release Please workflow\n- pass that token to release-please-action so release PR branch updates trigger downstream protected checks\n- use the same token for the pyproject prerelease normalization checkout/push\n\n## Why\nRelease Please was using the default GITHUB_TOKEN. Branches updated with GITHUB_TOKEN do not trigger pull_request CI/IPR workflows, so generated release PRs could be green for CodeQL/GitGuardian but blocked waiting for required CI contexts that never ran.\n\n## Validation\n- uv run --extra dev --group dev pre-commit run --files .github/workflows/release-please.yml