Repository navigation
Use GITHUB_TOKEN for docs workflow source access - #69423
Merged
DeagleGross merged 1 commit intoSep 21, 2026
Merged
Conversation
Use the native GITHUB_TOKEN for ASP.NET Core source reads and comments while keeping the docs GitHub App scoped to the docs repositories. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 878a3b22-439e-4665-9e1c-a0c228957f54
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Authentication regression tests have unresolved coverage gaps for repository values, source-step scoping, and the docs-token-prefixed git fetch.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Updates the docs workflow to use GITHUB_TOKEN for source-repository access while retaining the docs GitHub App for documentation repositories.
Changes:
- Separates source and documentation repository authentication.
- Adds source author notification handling.
- Adds authentication regression tests and regenerates the lock file.
| File | Summary |
|---|---|
.github/workflows/pr-docs-check/test_authentication.py |
Adds authentication checks. Moderate findings: assertions do not reliably validate repository entries or target the source-resolution step. |
.github/workflows/pr-docs-check.md |
Updates workflow credentials and permissions. Moderate finding: the authentication test does not cover the docs-token-prefixed git fetch. |
.github/workflows/pr-docs-check.lock.yml |
Regenerated compiled workflow. |
Comment on lines
+23
to
+25
| for match in re.finditer(r"repositories:(?: \S+|\s*\n(?: {8,}\S+\n)+)", self.workflow): | ||
| repositories = match.group(0) | ||
| self.assertNotRegex(repositories, r"(?im)^\s*aspnetcore\s*$") |
DeagleGross
enabled auto-merge (squash)
September 21, 2026 21:54
wtgodbe
approved these changes
Sep 21, 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
Recent documentation workflow runs failed while minting the ASP.NET Core docs GitHub App token because the request included
dotnet/aspnetcore, requiring the App installation to cover the source repository.This change uses the workflow's native
GITHUB_TOKENfor ASP.NET Core source reads, GitHub MCP access, and source PR comments. The docs App remains scoped todotnet/AspNetCore.Docs, withdotnet/AspNetCore.Docs.Automationincluded only where branch reads or writes require it. The trusted notification job now separates source-repository and docs-repository API calls so each uses the appropriate credential.Validation
python -m unittest discover -s .github\workflows\pr-docs-check -p "test_*.py" -vgh aw compile pr-docs-check --strict --validate --approveaspnetcoregit diff --check