Skip to content

Commit be2d07c

Browse files
authored
Create disallow-edits.yml
1 parent 2809a7a commit be2d07c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/policies/disallow-edits.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: GitOps.PullRequestIssueManagement
2+
description: GitOps.PullRequestIssueManagement primitive
3+
resource: repository
4+
5+
configuration:
6+
resourceManagementConfiguration:
7+
eventResponderTasks:
8+
- description: Close PRs that introduce an index file into the repository.
9+
if:
10+
- payloadType: Pull_Request
11+
- isAction:
12+
action: Opened
13+
- or:
14+
- filesMatchPattern:
15+
pattern: articles/index.yml
16+
then:
17+
- addReply:
18+
reply: >-
19+
@${issueAuthor} - You tried to add an index file to this repository; this is not permitted so your pull request will be closed automatically.
20+
- closePullRequest
21+

0 commit comments

Comments
 (0)