Repository navigation
Use shared Copilot PAT pool for docs workflow - #69431
Merged
DeagleGross merged 1 commit intoSep 22, 2026
Merged
Conversation
Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The workflow/auth changes are consistent with the PR intent and validation, with only a minor test readability nit identified.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
This PR updates the pr-docs-check agentic workflow to obtain GitHub Copilot inference credentials from ASP.NET Core’s shared copilot-pat-pool instead of a standalone COPILOT_GITHUB_TOKEN secret, and regenerates the strict lock file accordingly.
Changes:
- Import
shared/pat_pool.md, run the workflow in thecopilot-pat-poolenvironment, and setCOPILOT_GITHUB_TOKENvia the selected PAT pool entry. - Add authentication-focused unit tests to assert PAT-pool usage and the absence of
copilot-requests: write. - Regenerate
pr-docs-check.lock.ymlto reflect the new secrets, job dependencies, and environment wiring.
| File | Description |
|---|---|
| .github/workflows/pr-docs-check/test_authentication.py | Adds assertions ensuring Copilot inference uses the PAT pool and avoids copilot-requests: write. |
| .github/workflows/pr-docs-check.md | Switches Copilot token sourcing to the shared PAT pool and configures the copilot-pat-pool environment/import. |
| .github/workflows/pr-docs-check.lock.yml | Regenerated strict lock file reflecting PAT pool secrets, jobs, and environment propagation. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
|
||
|
|
||
| WORKFLOW = Path(__file__).parents[1] / "pr-docs-check.md" | ||
| POOL_TOKEN_EXPRESSION = "${{ case(needs.pat_pool.outputs.pat_number == '0', secrets.COPILOT_PAT_0, needs.pat_pool.outputs.pat_number == '1', secrets.COPILOT_PAT_1, needs.pat_pool.outputs.pat_number == '2', secrets.COPILOT_PAT_2, needs.pat_pool.outputs.pat_number == '3', secrets.COPILOT_PAT_3, needs.pat_pool.outputs.pat_number == '4', secrets.COPILOT_PAT_4, needs.pat_pool.outputs.pat_number == '5', secrets.COPILOT_PAT_5, needs.pat_pool.outputs.pat_number == '6', secrets.COPILOT_PAT_6, needs.pat_pool.outputs.pat_number == '7', secrets.COPILOT_PAT_7, needs.pat_pool.outputs.pat_number == '8', secrets.COPILOT_PAT_8, needs.pat_pool.outputs.pat_number == '9', secrets.COPILOT_PAT_9, 'NO COPILOT PAT AVAILABLE') }}" |
Youssef1313
approved these changes
Sep 22, 2026
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
pr-docs-checkCopilot inference from the standaloneCOPILOT_GITHUB_TOKENsecret to ASP.NET Core's shared PAT pooldotnet/aspnetcoresource operationsdotnet/AspNetCore.Docsanddotnet/AspNetCore.Docs.AutomationThe existing single
COPILOT_GITHUB_TOKENreturned HTTP 401 from/modelsin https://github.com/dotnet/aspnetcore/actions/runs/35660910787. The sharedcopilot-pat-poolis established ASP.NET Core infrastructure and avoids depending on that stale standalone repository secret. Copilot inference intentionally does not usecopilot-requests: writeor the workflowGITHUB_TOKEN.Validation
python -m unittest discover -s .github/workflows/pr-docs-check -p "test_*.py"(25 passed)gh aw compile pr-docs-check --strict --validate --approve.github/workflows/pr-docs-check.lock.ymlfor PAT-pool selection, environment propagation, token boundaries, and App repository scopegit diff --check