You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/policies/disallow-edits.yml
+58-2Lines changed: 58 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ configuration:
10
10
- payloadType: Pull_Request
11
11
- isAction:
12
12
action: Opened
13
-
- or:
13
+
- or:
14
14
- filesMatchPattern:
15
15
matchAny: true
16
16
pattern: articles/aks/*
@@ -121,4 +121,60 @@ configuration:
121
121
reply: >-
122
122
@${issueAuthor} - You tried to add content to a folder path that has been removed from this repository. Your pull request will be automatically closed. Submit your changes to the updated repository, which can be identified by clicking the Edit this Document link at the top of any published article for that product or service.
123
123
- closePullRequest
124
-
124
+
125
+
- description: Alert authors to edits in the /articles/reliability folder.
126
+
if:
127
+
# If a PR in the articles/reliability folder is opened, and the PR author isn't Anastasia or John...
128
+
- payloadType: Pull_Request
129
+
- filesMatchPattern:
130
+
matchAny: true
131
+
pattern: articles/reliability/*
132
+
- isAction:
133
+
action: Opened
134
+
- not:
135
+
or:
136
+
- isActivitySender:
137
+
user: anaharris-ms
138
+
- isActivitySender:
139
+
user: johndowns
140
+
then:
141
+
# Mention Anastasia and John, add a reply asking the PR author not to sign off on the PR, and add the needs-human-review label.
142
+
- mentionUsers:
143
+
mentionees:
144
+
- anaharris-ms
145
+
- johndowns
146
+
replyTemplate: >-
147
+
Tagging authors for this folder: ${mentionees}
148
+
- addReply:
149
+
reply: >-
150
+
@${issueAuthor} - Please do NOT sign off on this pull request. The Reliability Hub owners will sign off for you.
151
+
- addLabel:
152
+
label: needs-human-review
153
+
154
+
- description: Disallow sign-off for articles in the /articles/reliability folder.
155
+
if:
156
+
# If a 'sign-off' comment is added to a PR in the articles/reliability folder , and the PR author isn't Anastasia or John...
157
+
- payloadType: Issue_Comment
158
+
- isPullRequest
159
+
- filesMatchPattern:
160
+
matchAny: true
161
+
pattern: articles/reliability/*
162
+
- commentContains:
163
+
pattern: \#sign-off
164
+
isRegex: false
165
+
- not:
166
+
or:
167
+
- isActivitySender:
168
+
user: anaharris-ms
169
+
- isActivitySender:
170
+
user: johndowns
171
+
then:
172
+
# Add the do-not-merge label, remove the ready-to-merge label, and add a reply asking the PR author not to sign off on the PR.
173
+
- addReply:
174
+
reply: >-
175
+
@${issueAuthor} - Please do NOT sign off on this pull request. The Reliability Hub owners will sign off for you.
0 commit comments