Mint GitHub App token in versioning workflow#98
Merged
Conversation
Replace the expired POLICYENGINE_GITHUB PAT with a short-lived token minted via actions/create-github-app-token@v1 using org-level APP_ID and APP_PRIVATE_KEY. Matches the pattern already used by microdf, policyengine-core, and policyengine-us. Also pass the app token to EndBug/add-and-commit and disable its pre-commit fetch so the auto-generated "Update package version" commit pushes successfully and triggers the downstream PyPI publish. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
The
POLICYENGINE_GITHUBPAT referenced by.github/workflows/versioning.yamlexpired on 2026-01-12. Without a valid token, the versioning job's checkout step fails with:so the
Update package versioncommit never gets pushed and nothing publishes to PyPI.Fix
Swap the PAT for a short-lived GitHub App token minted via
actions/create-github-app-token@v1, using the org-levelAPP_ID/APP_PRIVATE_KEYsecrets. Matches the pattern already applied tomicrodf(#296),policyengine-core(#470),policyengine-us, and the country repos.Also pass the app token to
EndBug/add-and-commitand disable its pre-commit fetch so the auto-generatedUpdate package versioncommit pushes successfully and triggers the downstream PyPI publish job.Benefits over renewing the PAT:
Update package versioncommit fires the publish job)Test plan
yaml.safe_loadconfirms the workflow parseschangelog.d/fragment lands onmain) should produce anUpdate package versioncommit -> PyPI publish firesCo-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com