Skip to content

Commit d4170c2

Browse files
authored
Merge pull request #294470 from gewarren/reliability-policy
Add policy for reliability docs
2 parents f7b600b + 1e82219 commit d4170c2

File tree

1 file changed

+58
-2
lines changed

1 file changed

+58
-2
lines changed

.github/policies/disallow-edits.yml

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ configuration:
1010
- payloadType: Pull_Request
1111
- isAction:
1212
action: Opened
13-
- or:
13+
- or:
1414
- filesMatchPattern:
1515
matchAny: true
1616
pattern: articles/aks/*
@@ -121,4 +121,60 @@ configuration:
121121
reply: >-
122122
@${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.
123123
- 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.
176+
- addLabel:
177+
label: do-not-merge
178+
- removeLabel:
179+
label: ready-to-merge
180+

0 commit comments

Comments
 (0)