Skip to content

Commit d72e082

Browse files
authored
Test policy for azure-docs-pr (#45127)
1 parent 650272f commit d72e082

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/policies/disallow-edits.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,32 @@ configuration:
6060
permission: Read
6161
then:
6262
- closePullRequest
63+
64+
- description: (This is only a test policy that will be deleted.) Disallow sign-off for articles in the /docs/csharp folder.
65+
if:
66+
- or:
67+
- payloadType: Issue_Comment
68+
- payloadType: Pull_Request_Review_Comment
69+
- isAction:
70+
action: Created
71+
- isActivitySender:
72+
issueAuthor: True
73+
- filesMatchPattern:
74+
matchAny: true
75+
pattern: docs/csharp/*
76+
- commentContains:
77+
pattern: '#sign-off'
78+
isRegex: False
79+
- not:
80+
or:
81+
- isActivitySender:
82+
user: BillWagner
83+
then:
84+
# 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.
85+
- addReply:
86+
reply: >-
87+
@${issueAuthor} - Please do NOT sign off on this pull request!!
88+
- addLabel:
89+
label: do-not-merge
90+
- removeLabel:
91+
label: ready-to-merge

0 commit comments

Comments
 (0)