diff --git a/.github/policies/disallow-edits.yml b/.github/policies/disallow-edits.yml index 98b2b991f88..6ae458fe3ce 100644 --- a/.github/policies/disallow-edits.yml +++ b/.github/policies/disallow-edits.yml @@ -10,40 +10,158 @@ configuration: - payloadType: Pull_Request - isAction: action: Opened - - or: + then: + - if: - includesModifiedFile: file: xml/Microsoft.Extensions*/* # TODO - These files do use this repo as source-of-truth - how to exclude them? # - xml/Microsoft.Extensions.FileSystemGlobbing/* # - xml/Microsoft.Extensions.FileSystemGlobbing.Abstractions/* # - xml/Microsoft.Extensions.FileSystemGlobbing.Internal*/* + then: + - addReply: + reply: >- + @${issueAuthor} - This PR edits one or more files whose 'source of truth' for documentation is not in this repo. Please make documentation updates for 'Microsoft.Extensions' in the /// comments in the dotnet/runtime or dotnet/extensions repo instead. + - if: + - or: + - activitySenderHasPermission: + permission: None + - activitySenderHasPermission: + permission: Read + then: + - closePullRequest + - if: - includesModifiedFile: file: xml/System.Composition/* + then: + - addReply: + reply: >- + @${issueAuthor} - This PR edits one or more files whose 'source of truth' for documentation is not in this repo. Please make documentation updates for 'System.Composition' in the /// comments in the dotnet/runtime repo instead. + - if: + - or: + - activitySenderHasPermission: + permission: None + - activitySenderHasPermission: + permission: Read + then: + - closePullRequest + - if: - includesModifiedFile: file: xml/System.Formats.Cbor/* + then: + - addReply: + reply: >- + @${issueAuthor} - This PR edits one or more files whose 'source of truth' for documentation is not in this repo. Please make documentation updates for 'System.Formats.Cbor' in the /// comments in the dotnet/runtime repo instead. + - if: + - or: + - activitySenderHasPermission: + permission: None + - activitySenderHasPermission: + permission: Read + then: + - closePullRequest + - if: - includesModifiedFile: file: xml/System.Formats.Nrbf/* + then: + - addReply: + reply: >- + @${issueAuthor} - This PR edits one or more files whose 'source of truth' for documentation is not in this repo. Please make documentation updates for 'System.Formats.Nrbf' in the /// comments in the dotnet/runtime repo instead. + - if: + - or: + - activitySenderHasPermission: + permission: None + - activitySenderHasPermission: + permission: Read + then: + - closePullRequest + - if: - includesModifiedFile: file: xml/System.Net.ServerSentEvents/* + then: + - addReply: + reply: >- + @${issueAuthor} - This PR edits one or more files whose 'source of truth' for documentation is not in this repo. Please make documentation updates for 'System.Net.ServerSentEvents' in the /// comments in the dotnet/runtime repo instead. + - if: + - or: + - activitySenderHasPermission: + permission: None + - activitySenderHasPermission: + permission: Read + then: + - closePullRequest + - if: - includesModifiedFile: file: xml/System.Numerics.Tensors/* + then: + - addReply: + reply: >- + @${issueAuthor} - This PR edits one or more files whose 'source of truth' for documentation is not in this repo. Please make documentation updates for 'System.Numerics.Tensors' in the /// comments in the dotnet/runtime repo instead. + - if: + - or: + - activitySenderHasPermission: + permission: None + - activitySenderHasPermission: + permission: Read + then: + - closePullRequest + - if: - includesModifiedFile: file: xml/System.Speech/* + then: + - addReply: + reply: >- + @${issueAuthor} - This PR edits one or more files whose 'source of truth' for documentation is not in this repo. Please make documentation updates for 'System.Speech' in the /// comments in the dotnet/runtime repo instead. + - if: + - or: + - activitySenderHasPermission: + permission: None + - activitySenderHasPermission: + permission: Read + then: + - closePullRequest + - if: - includesModifiedFile: file: xml/System.Runtime.Serialization/ISerializationCodeDomSurrogateProvider.xml + then: + - addReply: + reply: >- + @${issueAuthor} - This PR edits one or more files whose 'source of truth' for documentation is not in this repo. Please make documentation updates for 'ISerializationCodeDomSurrogateProvider' in the /// comments in the dotnet/runtime repo instead. + - if: + - or: + - activitySenderHasPermission: + permission: None + - activitySenderHasPermission: + permission: Read + then: + - closePullRequest + - if: - includesModifiedFile: file: xml/System.Runtime.Serialization/ImportOptions.xml + then: + - addReply: + reply: >- + @${issueAuthor} - This PR edits one or more files whose 'source of truth' for documentation is not in this repo. Please make documentation updates for 'ImportOptions' in the /// comments in the dotnet/runtime repo instead. + - if: + - or: + - activitySenderHasPermission: + permission: None + - activitySenderHasPermission: + permission: Read + then: + - closePullRequest + - if: - includesModifiedFile: file: xml/System.Runtime.Serialization/XsdDataContractExporter.xml - then: - - addReply: - reply: >- - @${issueAuthor} - This PR edits one or more files whose 'source of truth' for documentation is not in this repo. To see which files are affected, look in the .github/policies/disallow-edits.yml file. Please make documentation updates for these assemblies in the /// comments in the source repo (either dotnet/runtime or dotnet/extensions) instead. - - if: - - or: - - activitySenderHasPermission: - permission: None - - activitySenderHasPermission: - permission: Read then: - - closePullRequest + - addReply: + reply: >- + @${issueAuthor} - This PR edits one or more files whose 'source of truth' for documentation is not in this repo. Please make documentation updates for 'XsdDataContractExporter' in the /// comments in the dotnet/runtime repo instead. + - if: + - or: + - activitySenderHasPermission: + permission: None + - activitySenderHasPermission: + permission: Read + then: + - closePullRequest