Skip to content

Commit 6ed59e8

Browse files
authored
Add policy to close empty issues
1 parent 5831ac1 commit 6ed59e8

File tree

1 file changed

+72
-2
lines changed

1 file changed

+72
-2
lines changed

.github/policies/close-issues.yml

+72-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,84 @@
11
name: Close issues
2-
description: Close issues based on label.
2+
description: Close issues based on label
33
resource: repository
44
where:
55
configuration:
66
resourceManagementConfiguration:
7-
eventResponderTasks:
7+
scheduledSearches:
8+
- frequencies:
9+
- daily:
10+
time: 12:00
11+
filters:
12+
- isIssue
13+
- isOpen
14+
- hasLabel:
15+
label: needs-more-info
16+
- noActivitySince:
17+
days: 14
18+
actions:
19+
- addReply:
20+
reply: This issue has been automatically closed due to no response from the original author. Feel free to reopen it if you have more information that can help us investigate the issue further.
21+
- closeIssue
22+
23+
eventResponderTasks:
24+
- description: Remove needs-more-info label when author comments on issue
25+
if:
26+
- payloadType: Issue_Comment
27+
- isAction:
28+
action: Created
29+
- isActivitySender:
30+
issueAuthor: True
31+
- hasLabel:
32+
label: needs-more-info
33+
- isOpen
34+
then:
35+
- removeLabel:
36+
label: needs-more-info
37+
triggerOnOwnActions: true
38+
839
- description: Close issues labeled 'code-of-conduct'
940
if:
1041
- payloadType: Issues
1142
- hasLabel:
1243
label: code-of-conduct
1344
then:
1445
- closeIssue
46+
47+
- description: Close learn template issues with empty descriptions. (spam)
48+
if:
49+
- payloadType: Issues
50+
- bodyContains:
51+
or:
52+
- pattern: '### Description[\n\r]+\[Enter feedback here\][\n\r]+###'
53+
isRegex: true
54+
- pattern: '### Description[\n\r]+\[Escriba sus comentarios aquí][\n\r]+###'
55+
isRegex: true
56+
- pattern: '### Description[\n\r]+\[Tapez vos commentaires ici][\n\r]+###'
57+
isRegex: true
58+
- pattern: '### Description[\n\r]+\[Hier Feedback eingeben][\n\r]+###'
59+
isRegex: true
60+
- pattern: '### Description[\n\r]+\[Geri bildiriminizi buraya girin][\n\r]+###'
61+
isRegex: true
62+
- pattern: '### Description[\n\r]+\[Ketikkan umpan balik di sini][\n\r]+###'
63+
isRegex: true
64+
- pattern: '### Description[\n\r]+\[Immetti qui i commenti][\n\r]+###'
65+
isRegex: true
66+
- pattern: '### Description[\n\r]+\[Voer hier feedback in][\n\r]+###'
67+
isRegex: true
68+
- pattern: '### Description[\n\r]+\[Insira comentários aqui][\n\r]+###'
69+
isRegex: true
70+
- pattern: '### Description[\n\r]+\[Введите отзыв здесь][\n\r]+###'
71+
isRegex: true
72+
- pattern: '### Description[\n\r]+\[اكتب ملاحظاتك هنا][\n\r]+###'
73+
isRegex: true
74+
- pattern: '### Description[\n\r]+\[在此处输入反馈][\n\r]+###'
75+
isRegex: true
76+
- pattern: '### Description[\n\r]+\[여기에 피드백 입력][\n\r]+###'
77+
isRegex: true
78+
- pattern: '### Description[\n\r]+\[フィードバックをこちらに入力してください][\n\r]+###'
79+
isRegex: true
80+
then:
81+
- addLabel: 'needs-more-info'
82+
- addReply:
83+
reply: This issue has been automatically closed due to an empty issue description from the original author. Feel free to reopen it if you have more information that can help us investigate the issue further.
84+
- closeIssue

0 commit comments

Comments
 (0)