Skip to content

Disallow edits on System.Text.RegularExpressions docs#12529

Merged
gewarren merged 1 commit intodotnet:mainfrom
danmoseley:disallow-regex-edits
Apr 17, 2026
Merged

Disallow edits on System.Text.RegularExpressions docs#12529
gewarren merged 1 commit intodotnet:mainfrom
danmoseley:disallow-regex-edits

Conversation

@danmoseley
Copy link
Copy Markdown
Member

Note

This PR description was AI/Copilot-generated.

Follow-up to dotnet/runtime#127038, which backports System.Text.RegularExpressions XML docs to /// comments in dotnet/runtime source.

Important

Do not merge until dotnet/runtime#127038 merges.

Changes

  • disallow-edits.yml: Add xml/System.Text.RegularExpressions/* to the GitOps policy that auto-closes PRs modifying files whose source of truth is in dotnet/runtime.
  • docfx.json: Set open_to_public_contributors to false for api/System.Text.RegularExpressions.** to hide the Edit button on learn.microsoft.com.

Remaining follow-up

Per #10722, since System.Text.RegularExpressions ships as part of the shared framework, it should also be added to the docs CI pipeline for ongoing validation (the list of XML files to push to the binaries repo). That step requires access to an internal SharePoint document and should be handled separately.

Fixes part of #10722

The source of truth for System.Text.RegularExpressions XML docs is
being moved to dotnet/runtime (see dotnet/runtime#127038).

- Add System.Text.RegularExpressions to disallow-edits.yml GitOps policy
- Set open_to_public_contributors to false in docfx.json

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@danmoseley danmoseley requested a review from a team as a code owner April 17, 2026 05:10
Copilot AI review requested due to automatic review settings April 17, 2026 05:10
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Apr 17, 2026
@danmoseley
Copy link
Copy Markdown
Member Author

@gewarren is this correct? and note the question about sharepoint

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates repository governance and DocFX metadata to prevent direct edits to System.Text.RegularExpressions API reference content in this repo, aligning with the move of the source-of-truth docs to /// comments in dotnet/runtime.

Changes:

  • Disallows PR edits to xml/System.Text.RegularExpressions/* via GitOps policy (auto-close on PR open).
  • Hides the “Edit” button for System.Text.RegularExpressions API pages by setting open_to_public_contributors to false in DocFX metadata.
Show a summary per file
File Description
docfx.json Marks api/System.Text.RegularExpressions.** as not open to public contributors to disable editing on published pages.
.github/policies/disallow-edits.yml Adds xml/System.Text.RegularExpressions/* to the set of paths that trigger the auto-close policy for PRs editing out-of-repo source-of-truth docs.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

@gewarren gewarren merged commit a951aec into dotnet:main Apr 17, 2026
13 checks passed
@danmoseley danmoseley deleted the disallow-regex-edits branch April 17, 2026 16:32
@danmoseley
Copy link
Copy Markdown
Member Author

@gewarren note the other PR isn't merged yet. It should happen today - it got stuck

@danmoseley
Copy link
Copy Markdown
Member Author

And I'm still curious -- is a 3rd flag needed -- to say "use XML file to populate content here" -- or does one of the flags set in this PR do that

@gewarren
Copy link
Copy Markdown
Contributor

And I'm still curious -- is a 3rd flag needed -- to say "use XML file to populate content here" -- or does one of the flags set in this PR do that

Yes, a third flag is needed, but I'll take care of it in dotnet/docs-tools#662. This repo isn't consulted during the ingestion of DLLs/XML files when the CI is run.

@danmoseley
Copy link
Copy Markdown
Member Author

OK Pr was merged on other side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants