Skip to content

Mint GitHub App token in versioning workflow#98

Merged
MaxGhenis merged 1 commit intomainfrom
migrate-to-app-token
Apr 18, 2026
Merged

Mint GitHub App token in versioning workflow#98
MaxGhenis merged 1 commit intomainfrom
migrate-to-app-token

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

The POLICYENGINE_GITHUB PAT referenced by .github/workflows/versioning.yaml expired on 2026-01-12. Without a valid token, the versioning job's checkout step fails with:

fatal: could not read Username for 'https://github.com': terminal prompts disabled

so the Update package version commit 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-level APP_ID / APP_PRIVATE_KEY secrets. Matches the pattern already applied to microdf (#296), policyengine-core (#470), policyengine-us, and the country repos.

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 job.

Benefits over renewing the PAT:

  • No annual expiry to chase
  • Not tied to any one person's account
  • Pushes by the App token still trigger downstream workflows (required here so the committed Update package version commit fires the publish job)

Test plan

  • yaml.safe_load confirms the workflow parses
  • After merge: next versioning push (when a changelog.d/ fragment lands on main) should produce an Update package version commit -> PyPI publish fires

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

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>
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
microcalibrate Ready Ready Preview, Comment Apr 17, 2026 11:46pm

Request Review

@MaxGhenis MaxGhenis merged commit 29fed67 into main Apr 18, 2026
6 checks passed
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