Skip to content

Fix docfx path bug - #723

Merged
gewarren merged 3 commits into
dotnet:mainfrom
gewarren:docfx-path-bug
Aug 31, 2026
Merged

Fix docfx path bug#723
gewarren merged 3 commits into
dotnet:mainfrom
gewarren:docfx-path-bug

Conversation

@gewarren

@gewarren gewarren commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Copilot AI lite review requested due to automatic review settings August 31, 2026 21:39
@gewarren
gewarren requested a review from BillWagner as a code owner August 31, 2026 21:39
@gewarren
gewarren enabled auto-merge (squash) August 31, 2026 21:43
@gewarren
gewarren disabled auto-merge August 31, 2026 21:44
@gewarren
gewarren merged commit e1b89c0 into dotnet:main Aug 31, 2026
8 checks passed
@gewarren
gewarren deleted the docfx-path-bug branch August 31, 2026 21:45

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.

🟡 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.json in subfolders.
  • Remove the .whatsnew.json configuration 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.

Comment thread actions/docs-verifier/src/RedirectionVerifier/RedirectionHelpers.cs
Comment thread actions/docs-verifier/src/RedirectionVerifier/DocfxConfiguration.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RedirectionVerifier] Action expects redirect when renaming a GitHub workflow in docs-maui repo

2 participants