Repository navigation
release: Hands release path on the pyautolabs-bot App (token phase 1) - #322
Merged
Merged
Conversation
Every release.yml job that touched another repo with PAT_PYAUTOLABS now mints a one-hour, narrowly-scoped token with actions/create-github-app-token@v3 (APP_CLIENT_ID / APP_PRIVATE_KEY). Git auth goes through `gh auth setup-git` or actions/checkout `token:`; every URL-embedded token and the per-project `pat:` matrix field / secrets[...] lookup are gone, closing the #319 class (git drops URL credentials on redirect). The library and workspace tag pushes mint immediately before use. Bot commits and tags are authored as pyautolabs-bot[bot]. release_workspaces no longer carries the unused PyPI env. PyPI/TestPyPI publishing (release.yml and publish_tombstone.yml) stays on twine with the existing tokens; the trusted-publishing replacement is left as a commented TODO(token-phase-1b) until the publishers are registered. Refs #321 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Token consolidation phase 1 moves the PyAutoHands release path off the person-owned
PAT_PYAUTOLABSand onto the org-ownedpyautolabs-botGitHub App. It also removes every URL-embedded token, which closes the #319 failure class: git drops URL credentials on any redirect.release.ymljob that touches another repo now mints a one-hour token withactions/create-github-app-token@v3. Each token gets the narrowestrepositories:list andpermission-*:set that job needs. The jobs arerelease,announce_release,clear_pending_release_labels,publish_release_notes,release_workspaces,bump_library_colab_urlsand the threewiki_drift_issue*jobs.release) and the workspace push (release_workspaces) mint their token immediately before use. Auth goes throughgh auth setup-git, oractions/checkouttoken:in the short jobs. Clones usepersist-credentials: falseso the checkout's GITHUB_TOKEN cannot shadow the App credential.pat:matrix field, thesecrets[matrix.project.pat]lookup,git remote set-url --push "https://$PAT@…"and everyhttps://$PAT@clone. The existing tag retry/idempotency logic is unchanged.pyautolabs-bot[bot]/346909844+pyautolabs-bot[bot]@users.noreply.github.com(bot user id).release_workspacesno longer carries the unusedTWINE_*/PYPIenv.Merge order: merge the Heart PR (PyAutoLabs/PyAutoHeart#316) first. This PR is safe to merge only after Heart's token push check is green on main AND no release run is live.
Phase 1b: the switch to PyPI/TestPyPI trusted publishing is left as a commented
TODO(token-phase-1b)block above each twine upload, inrelease.ymlandpublish_tombstone.yml. It waits on the human registering the PyPI publishers. Until then, publishing is unchanged.Heart YELLOW acknowledged by the human 2026-10-23 (manifest drift; PyAutoLens release validation stale).
Refs #321. This PR closes nothing; the issue closes after both PRs merge.
API Changes
No Python API change; workflow auth mechanism change.
release.ymlnow requires:vars.APP_CLIENT_ID(org variable)secrets.APP_PRIVATE_KEY(org secret)secrets.PYPI/secrets.TEST_PYPI, still required until phase 1bPAT_PYAUTOLABSis no longer read by Hands.See full details below.
Test Plan
python -m pytest tests -q→535 passedrelease.ymlandpublish_tombstone.yml. actionlint 1.7.12 reports only false positives (its bundledcreate-github-app-token@v3metadata predatesclient-id) and the pre-existingset-outputdeprecation.grepof.github/forPAT_PYAUTOLABS,secrets[and URL userinfo: none found.Token Push CheckPR run (push=True×5).releasejob Tag step.Full API Changes (for automation & release notes)
Removed
release.yml:pat:matrix fields,secrets[matrix.project.pat], and thePAT_PYAUTOLABSuses in all jobsrelease.ymlrelease_workspaces: job-levelTWINE_*/PYPIenv (unused)Added
release.yml: per-jobactions/create-github-app-token@v3steps;publish_release_notesmatrix fieldtoken_reposrelease.yml,publish_tombstone.yml: commented OIDC replacement blocks (TODO(token-phase-1b))Migration
APP_CLIENT_ID(variable) andAPP_PRIVATE_KEY(secret). Both already exist, and the App is installed on all repos.Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code