Fix docfx path bug - #723
Merged
Merged
Conversation
gewarren
enabled auto-merge (squash)
August 31, 2026 21:43
gewarren
disabled auto-merge
August 31, 2026 21:44
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR fixes the DocFX path-scoping issue described in #722 by making file glob patterns account for the directory where docfx.json is found, and removes the legacy “What’s new” exclusion logic since those docs are no longer published.
Changes:
- Capture the directory where a configuration file is discovered and use it to scope DocFX matcher include patterns correctly for
docfx.jsonin subfolders. - Remove the
.whatsnew.jsonconfiguration models/reader and stop filtering redirect checks based on “What’s new” directories. - Minor code modernizations/cleanups and NuGet source updates.
File summaries
| File | Description |
|---|---|
| actions/docs-verifier/src/RedirectionVerifier/WhatsNewConfigurationReader.cs | Removed obsolete “What’s new” config reader. |
| actions/docs-verifier/src/RedirectionVerifier/WhatsNewConfiguration.cs | Removed obsolete “What’s new” config model. |
| actions/docs-verifier/src/RedirectionVerifier/NavigationOptions.cs | Removed obsolete navigation options model used for “What’s new”. |
| actions/docs-verifier/src/RedirectionVerifier/RedirectionVerifier.csproj | Adds a package reference (reviewed for necessity). |
| actions/docs-verifier/src/RedirectionVerifier/RedirectionsVerifier.cs | Small refactor + comment/docstring formatting adjustments. |
| actions/docs-verifier/src/RedirectionVerifier/RedirectionHelpers.cs | Simplifies redirection file name fallback logic. |
| actions/docs-verifier/src/RedirectionVerifier/OpenPublishingRedirectionReader.cs | Minor pattern-matching simplification. |
| actions/docs-verifier/src/RedirectionVerifier/OpenPublishingConfigReader.cs | Minor pattern-matching simplification. |
| actions/docs-verifier/src/RedirectionVerifier/DocfxConfigurationReader.cs | Passes config directory into matcher construction. |
| actions/docs-verifier/src/RedirectionVerifier/DocfxConfiguration.cs | Implements “effective source” logic to fix DocFX glob scoping for subfolder docfx.json. |
| actions/docs-verifier/src/BuildVerifier.IO.Abstractions/BaseConfigurationReader.cs | Records the directory where the config file was found. |
| actions/docs-verifier/src/ActionRunner/Program.cs | Removes “What’s new” filtering and modernizes string slicing / list creation. |
| actions/docs-verifier/nuget.config | Adds an additional NuGet package source. |
Review details
Suppressed comments (2)
actions/docs-verifier/src/RedirectionVerifier/DocfxConfiguration.cs:50
- When content.Files is null, the matcher includes "**" without the effectiveSource prefix. For docfx.json located in a subdirectory (the #722 scenario), this will match files outside the docs folder again (e.g., .github/workflows). Scope the default include to effectiveSource.
else
{
matcher.AddInclude("**");
}
actions/docs-verifier/src/RedirectionVerifier/RedirectionsVerifier.cs:37
- The TODO comment ends with "variable?." (question mark + period). Fix the punctuation so the comment reads cleanly.
// TODO: Verify file existence if it starts with "/<our_docset>".
// Will this require setting the docset as an env variable?.
- Files reviewed: 13/13 changed files
- Comments generated: 4
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Uh oh!
There was an error while loading. Please reload this page.