Skip to content

Commit ba799f5

Browse files
committed
remove edit button from certain files and add policy to close PRs
1 parent 29788eb commit ba799f5

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: GitOps.PullRequestIssueManagement
2+
description: GitOps.PullRequestIssueManagement primitive
3+
resource: repository
4+
5+
configuration:
6+
resourceManagementConfiguration:
7+
eventResponderTasks:
8+
- description: Close PRs that modify files whose "source of truth" is not in this repo.
9+
if:
10+
- payloadType: Pull_Request
11+
- isAction:
12+
action: Opened
13+
- or:
14+
- filesMatchPattern:
15+
pattern: xml/System.Composition/*.xml
16+
- filesMatchPattern:
17+
pattern: xml/System.Formats.Cbor/*.xml
18+
- filesMatchPattern:
19+
pattern: xml/System.Formats.Nrbf/*.xml
20+
- filesMatchPattern:
21+
pattern: xml/System.Net.ServerSentEvents/*.xml
22+
- filesMatchPattern:
23+
pattern: xml/System.Numerics.Tensors/*.xml
24+
- filesMatchPattern:
25+
pattern: xml/System.Speech/*.xml
26+
- includesModifiedFile:
27+
file: xml/System.Runtime.Serialization/ISerializationCodeDomSurrogateProvider.xml
28+
- includesModifiedFile:
29+
file: xml/System.Runtime.Serialization/ImportOptions.xml
30+
- includesModifiedFile:
31+
file: xml/System.Runtime.Serialization/XsdDataContractExporter.xml
32+
then:
33+
- addReply:
34+
reply: "@${issueAuthor} This PR will be closed because it edits files whose 'source of truth' is not in the repo."
35+
- closePullRequest

docfx.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,17 @@
145145
},
146146
"langs": {
147147
"api/**.yml": ["csharp", "vb", "fsharp", "cpp"]
148+
},
149+
"open_to_public_contributors": {
150+
"xml/System.Composition/*.xml": false,
151+
"xml/System.Formats.Cbor/*.xml": false,
152+
"xml/System.Formats.Nrbf/*.xml": false,
153+
"xml/System.Net.ServerSentEvents/*.xml": false,
154+
"xml/System.Numerics.Tensors/*.xml": false,
155+
"xml/System.Runtime.Serialization/ISerializationCodeDomSurrogateProvider.xml": false,
156+
"xml/System.Runtime.Serialization/ImportOptions.xml": false,
157+
"xml/System.Runtime.Serialization/XsdDataContractExporter.xml": false,
158+
"xml/System.Speech*/*.xml": false
148159
}
149160
},
150161
"dest": "_site",

0 commit comments

Comments
 (0)