Repository navigation
Description
Goal
Migrate every bare secrets.GH_PAT_WORKFLOWS reference in this repo's workflows to the canonical-first fallback chain ${{ secrets.GH_PAT_DON_PETRY || secrets.GH_PAT_WORKFLOWS }}. This is the last blocker to deleting the legacy org secret GH_PAT_WORKFLOWS (tracked in .github-private#1326).
GH_PAT_DON_PETRY is an org secret available to all repos and holds the same don-petry PAT. Adding it as the first term makes every consumer prefer it; the || secrets.GH_PAT_WORKFLOWS term keeps behavior identical until the old secret is deleted. Referencing secrets.GH_PAT_DON_PETRY inside a || expression needs no workflow_call.secrets declaration (an unset secret in a || just evaluates empty) — so no secrets: blocks change except where noted below.
Scope — files & lines (origin/main)
Replace each bare secrets.GH_PAT_WORKFLOWS with secrets.GH_PAT_DON_PETRY || secrets.GH_PAT_WORKFLOWS:
auto-rebase-reusable.yml— L107 (GH_TOKEN). L108 footgun below.daily-org-status.yml— L25, L50feature-ideation.yml— L110, L118idea-enhancer-reusable.yml— L54, L63idea-triage-reusable.yml— L44, L53initiative-driver.yml— L76, L85initiative-planner-reusable.yml— L57, L67, L89persona-mention-reusable.yml— L121pinned-version-report.yml— L24, L33pr-review-mention-reusable.yml— L76, L118, L195pr-auto-review.yml— L52. by-name footgun below.pr-auto-review-reusable.yml— L45, L118, L126, L231. See footgun — these are consumed via the by-name pass, so leave them unchanged.
Two footguns — do NOT naive-find/replace these
-
auto-rebase-reusable.yml:108is a boolean guardHAS_PAT: ${{ secrets.GH_PAT_WORKFLOWS != '' }}. It must become:HAS_PAT: ${{ (secrets.GH_PAT_DON_PETRY || secrets.GH_PAT_WORKFLOWS) != '' }}
(parens required, else the guard reads false once the old secret is deleted).
-
pr-auto-review.yml:52passes the secret by name into the localpr-auto-review-reusable.yml(secrets:block, notinherit):secrets: GH_PAT_WORKFLOWS: ${{ secrets.GH_PAT_DON_PETRY || secrets.GH_PAT_WORKFLOWS }}
Change only this value line. Keep the passed secret name
GH_PAT_WORKFLOWS. The four internal refs inpr-auto-review-reusable.yml(L45/118/126/231) already resolve to this passed value — leave them assecrets.GH_PAT_WORKFLOWS, do not add the fallback there (inside a by-name reusablesecrets.GH_PAT_DON_PETRYis empty).
Out of scope (no change needed)
tests/test_feature_ideation.bats:87grepssecrets.GH_PAT_WORKFLOWS— still a substring of the fallback chain, so it stays green; do not edit.
Acceptance criteria
- Every bare runtime
secrets.GH_PAT_WORKFLOWSabove prefersGH_PAT_DON_PETRY, with the two footguns handled as specified. - No new
workflow_call.secretsdeclarations added;pr-auto-review.ymlkeeps passing the nameGH_PAT_WORKFLOWS. - All workflows still parse (CI green);
test_feature_ideation.batsstill passes. - PR body confirms the auto-rebase
!= ''guard uses parens.
Once merged with a green run, .github-private#1326 can proceed to delete GH_PAT_WORKFLOWS.
Activity
don-petry commentedon Jul 20, 2026
Dev-Lead Implementation Plan
Issue: #833 — Migrate bare GH_PAT_WORKFLOWS refs to GH_PAT_DON_PETRY fallback (unblock secret retirement)
Scope
Replace every bare runtime
secrets.GH_PAT_WORKFLOWSin the listed workflows with the canonical-first chainsecrets.GH_PAT_DON_PETRY || secrets.GH_PAT_WORKFLOWS, handling the two footguns exactly, and leaving the by-name-consumedpr-auto-review-reusable.ymlinternal refs bare.Implementation Checklist
auto-rebase-reusable.ymlL107 →${{ secrets.GH_PAT_DON_PETRY || secrets.GH_PAT_WORKFLOWS || github.token }}auto-rebase-reusable.ymlL108 (footgun) →HAS_PAT: ${{ (secrets.GH_PAT_DON_PETRY || secrets.GH_PAT_WORKFLOWS) != '' }}(parens required)daily-org-status.ymlL25, L50feature-ideation.ymlL110, L118idea-enhancer-reusable.ymlL54, L63idea-triage-reusable.ymlL44, L53initiative-driver.ymlL76, L85initiative-planner-reusable.ymlL57, L67, L89persona-mention-reusable.ymlL121pinned-version-report.ymlL24, L33pr-review-mention-reusable.ymlL76, L118, L195 (consumed viasecrets: inherit, so fallback resolves)pr-auto-review.ymlL52 (footgun) → change only the passed value; keep the passed secret nameGH_PAT_WORKFLOWSpr-auto-review-reusable.ymlL45/118/126/231 → leave bare (by-name pass;GH_PAT_DON_PETRYis empty inside)Tests to Write
test/workflows/pr-review-mention/pinning the reusable's three GH_TOKEN refs to the fallback chain (CI-wired viapr-review-mention-tests.yml). Remaining files are behavior-preserving config with no dedicated harness — covered by YAML-parse + existing suites.Test Command
bats --print-output-on-failure test/workflows/pr-review-mention/andbash .dev-lead/scripts/dev-lead-lint.shdon-petry commentedon Jul 20, 2026
Dev-Lead: Implementation Complete
Plan Execution
test/workflows/pr-review-mention/reusable-secrets.bats) pinning the three reusable GH_TOKEN refs to the canonical fallback — confirmed red before the migration, green after.secrets.GH_PAT_WORKFLOWS→secrets.GH_PAT_DON_PETRY || secrets.GH_PAT_WORKFLOWSacross the 11 in-scope files (22 lines, exactly matching the issue scope).auto-rebase-reusable.yml:108guard now uses parens:HAS_PAT: ${{ (secrets.GH_PAT_DON_PETRY || secrets.GH_PAT_WORKFLOWS) != '' }}; L107 chainsGH_PAT_DON_PETRY || GH_PAT_WORKFLOWS || github.token.pr-auto-review.yml:52changed only the value; the passed secret name staysGH_PAT_WORKFLOWS. The four internal refs inpr-auto-review-reusable.yml(L45/118/126/231) left bare (by-name pass;GH_PAT_DON_PETRYis empty inside).workflow_call.secretsdeclarations orsecrets:block keys added/changed.dev-lead-lint.shpasses, and affected bats suites are green.Test Results
Files Changed
auto-rebase-reusable.yml: L107 fallback chain; L108 parenthesized!= ''guard.daily-org-status.yml,feature-ideation.yml,idea-enhancer-reusable.yml,idea-triage-reusable.yml,initiative-driver.yml,initiative-planner-reusable.yml,persona-mention-reusable.yml,pinned-version-report.yml,pr-review-mention-reusable.yml: bare GH_TOKEN refs → canonical-first fallback.pr-auto-review.yml: passed-value line only; name kept asGH_PAT_WORKFLOWS.test/workflows/pr-review-mention/reusable-secrets.bats: new — pins the reusable's fallback wiring (CI-wired viapr-review-mention-tests.yml).Notes
pr-auto-review-reusable.ymlintentionally unchanged — its refs resolve to the by-name-passed value, whereGH_PAT_DON_PETRYis empty. Confirmed the only remaining bare runtime refs in the repo are exactly those four.tests/test_feature_ideation.bats:87; no such file exists on this branch, so nothing to leave alone there. The currentfeature-ideationbats suite stays green.GH_PAT_WORKFLOWSis deleted (unblocks .github-private#1326); the guard-parens ensure the boolean stays correct post-deletion.feat: implement issue #833 — Migrate bare GH_PAT_WORKFLOWS refs to GH…