From 2b8dad8e90eea2a178996fd71d0889a9d2657d0d Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Fri, 27 Sep 2024 14:10:19 -0700 Subject: [PATCH 1/3] fix all file paths - some are already working --- .github/policies/disallow-edits.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/policies/disallow-edits.yml b/.github/policies/disallow-edits.yml index 14920829730..2b98da5613e 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: @@ -48,4 +46,5 @@ configuration: reply: >- Hello @${issueAuthor}, - This PR will be closed because it edits files whose 'source of truth' is not in the repo. + This PR will be closed because it edits files whose 'source of truth' is not in this repo. Instead, please make these documentation updates in the /// comments in the source repo (either dotnet/runtime or dotnet/extensions). + - closePullRequest From cc902c8aa795ebaf94e2aa20c1f3865b8c99bd6a Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Fri, 27 Sep 2024 14:39:58 -0700 Subject: [PATCH 2/3] few improvements --- .github/policies/disallow-edits.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/policies/disallow-edits.yml b/.github/policies/disallow-edits.yml index 2b98da5613e..db0eefb5156 100644 --- a/.github/policies/disallow-edits.yml +++ b/.github/policies/disallow-edits.yml @@ -44,7 +44,12 @@ configuration: then: - addReply: reply: >- - Hello @${issueAuthor}, - - This PR will be closed because it edits files whose 'source of truth' is not in this repo. Instead, please make these documentation updates in the /// comments in the source repo (either dotnet/runtime or dotnet/extensions). - - closePullRequest + 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 From 89f03eed6c9b38f9681b23c33c2f192c05d71460 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Fri, 27 Sep 2024 14:41:38 -0700 Subject: [PATCH 3/3] @mention PR author --- .github/policies/disallow-edits.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/policies/disallow-edits.yml b/.github/policies/disallow-edits.yml index db0eefb5156..5769018a468 100644 --- a/.github/policies/disallow-edits.yml +++ b/.github/policies/disallow-edits.yml @@ -44,7 +44,7 @@ configuration: then: - addReply: reply: >- - 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. + @${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: