Skip to content

[gh-aw] Migrate workflows to Copilot PAT Pool - #11757

Merged
jonathanpeppers merged 2 commits into
mainfrom
vitek-karas/gh-aw-pat-pool
Jun 30, 2026
Merged

[gh-aw] Migrate workflows to Copilot PAT Pool#11757
jonathanpeppers merged 2 commits into
mainfrom
vitek-karas/gh-aw-pat-pool

Conversation

@vitek-karas

Copy link
Copy Markdown
Member

Summary

  • add the shared GH-AW Copilot PAT Pool import and onboarding README
  • migrate android-reviewer and nightly-fix-finder to copilot-pat-pool and select COPILOT_PAT_0..9 via engine.env.COPILOT_GITHUB_TOKEN
  • add validate-pat-pool.yml and regenerate the compiled lock files

Validation

  • gh aw compile android-reviewer nightly-fix-finder --strict --schedule-seed dotnet/android

Security review note

  • New restricted secrets: COPILOT_PAT_0, COPILOT_PAT_1, COPILOT_PAT_2, COPILOT_PAT_3, COPILOT_PAT_4, COPILOT_PAT_5, COPILOT_PAT_6, COPILOT_PAT_7, COPILOT_PAT_8, COPILOT_PAT_9
  • Existing secret still used by nightly-fix-finder: ANDROID_TEAM_PAT
  • Generated action manifest change reviewed: the regenerated lock files now reference github/gh-aw-actions/setup@v0.80.9 as part of the gh aw compile output, alongside the PAT-pool secret additions
  • Reviewed these changes for intent and safety: the new PAT secrets are only consumed by the imported pat_pool job to choose a populated slot and by the case(...) expression that maps the selected slot into COPILOT_GITHUB_TOKEN; the workflow outputs continue to use the normal Actions tokens and do not expose PAT values

Follow-up

  • this requires a copilot-pat-pool environment with COPILOT_PAT_0..9; nightly-fix-finder also needs ANDROID_TEAM_PAT available in that environment

Add the shared PAT pool import and README, wire the GH-AW workflow sources to use the copilot-pat-pool environment and COPILOT_PAT_0..9 selection, regenerate the lock files, and add the PAT pool validation workflow.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vitek-karas
vitek-karas temporarily deployed to copilot-pat-pool June 29, 2026 12:36 — with GitHub Actions Inactive
@vitek-karas
vitek-karas temporarily deployed to copilot-pat-pool June 29, 2026 12:37 — with GitHub Actions Inactive
@vitek-karas
vitek-karas temporarily deployed to copilot-pat-pool June 29, 2026 12:42 — with GitHub Actions Inactive
@jonathanpeppers
jonathanpeppers marked this pull request as ready for review June 30, 2026 15:14
Copilot AI review requested due to automatic review settings June 30, 2026 15:14

@jonathanpeppers jonathanpeppers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The environment is setup, but I think we have to merge to test.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the repo’s agentic workflows to use a shared “Copilot PAT Pool” (10-slot secret pool) to reduce contention/rate-limiting from a single shared PAT, and adds a scheduled validation workflow to proactively detect stale/empty PAT pools.

Changes:

  • Added a reusable shared/pat_pool.md import (plus onboarding README) to select a populated PAT slot and expose it as a job output.
  • Updated android-reviewer and nightly-fix-finder agentic workflows to run in the copilot-pat-pool environment and map the selected slot to COPILOT_GITHUB_TOKEN via case(...).
  • Added validate-pat-pool.yml and regenerated compiled .lock.yml workflows; updated the agentic actions lock.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
.github/workflows/validate-pat-pool.yml New scheduled/manual workflow to validate COPILOT_PAT_0..9 via a lightweight Copilot CLI call and summarize results.
.github/workflows/shared/pat_pool.README.md New onboarding + usage documentation for the shared PAT pool import pattern.
.github/workflows/shared/pat_pool.md New reusable import that selects a random non-empty PAT slot (0–9) and outputs the slot number.
.github/workflows/nightly-fix-finder.md Migrates workflow to import pat_pool, run in copilot-pat-pool, and set COPILOT_GITHUB_TOKEN from COPILOT_PAT_0..9.
.github/workflows/nightly-fix-finder.lock.yml Regenerated compiled workflow reflecting PAT-pool secrets, updated gh-aw actions/tooling versions, and other compiler output updates.
.github/workflows/android-reviewer.md Migrates workflow to import pat_pool, run in copilot-pat-pool, and set COPILOT_GITHUB_TOKEN from COPILOT_PAT_0..9.
.github/workflows/android-reviewer.lock.yml Regenerated compiled workflow reflecting PAT-pool secrets and updated gh-aw actions/tooling versions.
.github/aw/actions-lock.json Updates pinned gh-aw setup action entry to v0.80.9 and removes older setup-cli entry.

Comment on lines +25 to +28
- name: Setup gh-aw scripts
uses: github/gh-aw-actions/setup@b8068426813005612b960b5ab0b8bd2c27142323 # v0.71.5
with:
destination: ${{ runner.temp }}/gh-aw/actions
Comment thread .github/workflows/validate-pat-pool.yml
Comment thread .github/workflows/validate-pat-pool.yml
Comment thread .github/workflows/shared/pat_pool.md
Comment thread .github/workflows/shared/pat_pool.md
@jonathanpeppers
jonathanpeppers merged commit 9c33655 into main Jun 30, 2026
44 of 49 checks passed
@jonathanpeppers
jonathanpeppers deleted the vitek-karas/gh-aw-pat-pool branch June 30, 2026 15:22
simonrozsival pushed a commit that referenced this pull request Jul 1, 2026
…11823)

Follow-up to #11757.

The `validate-pat-pool.yml` workflow added in #11757 was still pinned to `github/gh-aw-actions/setup@v0.71.5`, while the compiled agentic workflows and `.github/aw/actions-lock.json` were on v0.80.9. That version drift defeats the purpose of validation, since PATs were being exercised with a different `install_copilot_cli.sh` than the workflows that actually consume them (raised in [this review comment](#11757 (comment)...)).

This PR aligns everything to the gh-aw release currently installed in the repo's toolchain (v0.81.6):

- Bumps `validate-pat-pool.yml` to use `setup@v0.81.6`.
- Re-runs `gh aw compile`, which regenerates `android-reviewer.lock.yml`, `nightly-fix-finder.lock.yml`, `agentics-maintenance.yml`, and the `actions-lock.json` to v0.81.6 (and re-adds the `setup-cli@v0.81.6` lock entry).

No behavior change beyond the upstream gh-aw bump itself; the recompile is the standard mechanical output. The other review comments on #11757 (Copilot CLI version, fallback wording, `permissions: {}`) are intentionally left for a separate change.
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 31, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants