Repository navigation
Fix documentation workflow output handling - #69435
Merged
DeagleGross merged 1 commit intoSep 22, 2026
Merged
Conversation
Co-authored-by: Copilot App <[email protected]>
Contributor
|
Hey @dotnet/aspnet-build, looks like this PR is something you want to take a look at. |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The changes are small, targeted to the described workflow failures, and include additional unit coverage for the corrected preflight paths.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Updates the pr-docs-check workflow’s “safe-output” validation and source-PR notification permissions to address two observed workflow failures, and adds/extends unit tests to prevent regressions.
Changes:
- Fixes
validate_preflightdrafted-outcome handling by validatingdocs_pr_action: createdandupdatedin explicit branches. - Adds positive preflight tests for both
createdandupdateddrafted paths. - Updates the “Notify source PR” job permissions (and corresponding docs/lock output) to allow the workflow to write back to the source PR as intended.
| File | Description |
|---|---|
| .github/workflows/pr-docs-check/validate_outcome.py | Corrects preflight branching so valid drafted created / updated outcomes are accepted and validated appropriately. |
| .github/workflows/pr-docs-check/test_validate_outcome.py | Adds coverage ensuring preflight accepts valid drafted create/update scenarios. |
| .github/workflows/pr-docs-check/test_authentication.py | Extends authentication/permissions assertions for inference-only PAT pool usage and source notification job behavior. |
| .github/workflows/pr-docs-check.md | Updates workflow definition to grant pull-requests: write for “Notify source PR”. |
| .github/workflows/pr-docs-check.lock.yml | Regenerates compiled workflow output reflecting the updated permissions. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
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.

Fixes two failures observed in workflow run 35706277858.
The safe-output preflight validator used a single
elifchain for drafted outcomes. A validdocs_pr_action: createdwith exactly onecreate_pull_requestmade the error predicate false, then fell through to the final rejection. This change validatescreatedandupdatedin explicit branches and adds positive preflight coverage for both paths while retaining the existing negative cases.The custom
Notify source PRjob attempted to comment on the merged source PR withissues: writebut onlypull-requests: read, which produced403 Resource not accessible by integration. The job now grants bothissues: writeandpull-requests: writeand continues to use the native${{ github.token }}for the source-repository comment.The Copilot PAT pool remains inference-only. Pool PATs have only Copilot Requests (Read), so they are not used for source comments or any repository mutation. Tests enforce that the pool expression is confined to the engine configuration. The existing authentication split is preserved: the native workflow token handles ordinary dotnet/aspnetcore operations, while the docs GitHub App remains limited to AspNetCore.Docs and AspNetCore.Docs.Automation.
Validation:
python -m unittest discover -s .github/workflows/pr-docs-check -p "test_*.py"(28 passed)gh aw compile pr-docs-check --strict --validate --approvegit diff --check