diff --git a/.github/policies/disallow-edits.yml b/.github/policies/disallow-edits.yml index 14920829730..5769018a468 100644 --- a/.github/policies/disallow-edits.yml +++ b/.github/policies/disallow-edits.yml @@ -8,8 +8,6 @@ configuration: - description: Close PRs that modify files whose "source of truth" is not in this repo. if: - payloadType: Pull_Request - - isAction: - action: Opened - or: - includesModifiedFiles: files: @@ -21,22 +19,22 @@ configuration: - xml/Microsoft.Extensions.FileSystemGlobbing.Internal*/* - includesModifiedFiles: files: - - xml/System.Composition + - xml/System.Composition/* - includesModifiedFiles: files: - - xml/System.Formats.Cbor + - xml/System.Formats.Cbor/* - includesModifiedFiles: files: - - xml/System.Formats.Nrbf + - xml/System.Formats.Nrbf/* - includesModifiedFiles: files: - - xml/System.Net.ServerSentEvents + - xml/System.Net.ServerSentEvents/* - includesModifiedFiles: files: - - xml/System.Numerics.Tensors + - xml/System.Numerics.Tensors/* - includesModifiedFiles: files: - - xml/System.Speech + - xml/System.Speech/* - includesModifiedFile: file: xml/System.Runtime.Serialization/ISerializationCodeDomSurrogateProvider.xml - includesModifiedFile: @@ -46,6 +44,12 @@ configuration: then: - addReply: reply: >- - Hello @${issueAuthor}, - - This PR will be closed because it edits files whose 'source of truth' is not in the repo. + @${issueAuthor} - This PR edits files whose 'source of truth' for documentation is not in this repo. If you're editing the documentation, please make these updates in the /// comments in the source repo (either dotnet/runtime or dotnet/extensions) instead. + - if: + - not: + - or: + - activitySenderHasPermission: + permission: write + - activitySenderHasPermission: + permission: admin + - closePullRequest