Skip to content

Commit 098cd84

Browse files
authored
Add policy to close empty issues (#11213)
1 parent 037af01 commit 098cd84

File tree

1 file changed

+85
-2
lines changed

1 file changed

+85
-2
lines changed

.github/policies/close-issues.yml

+85-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,97 @@
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+
- or:
51+
- bodyContains:
52+
pattern: '### Description[\n\r]+\[Enter feedback here\][\n\r]+###'
53+
isRegex: True
54+
- bodyContains:
55+
pattern: '### Description[\n\r]+\[Escriba sus comentarios aquí][\n\r]+###'
56+
isRegex: True
57+
- bodyContains:
58+
pattern: '### Description[\n\r]+\[Tapez vos commentaires ici][\n\r]+###'
59+
isRegex: True
60+
- bodyContains:
61+
pattern: '### Description[\n\r]+\[Hier Feedback eingeben][\n\r]+###'
62+
isRegex: true
63+
- bodyContains:
64+
pattern: '### Description[\n\r]+\[Geri bildiriminizi buraya girin][\n\r]+###'
65+
isRegex: True
66+
- bodyContains:
67+
pattern: '### Description[\n\r]+\[Ketikkan umpan balik di sini][\n\r]+###'
68+
isRegex: True
69+
- bodyContains:
70+
pattern: '### Description[\n\r]+\[Immetti qui i commenti][\n\r]+###'
71+
isRegex: True
72+
- bodyContains:
73+
pattern: '### Description[\n\r]+\[Voer hier feedback in][\n\r]+###'
74+
isRegex: True
75+
- bodyContains:
76+
pattern: '### Description[\n\r]+\[Insira comentários aqui][\n\r]+###'
77+
isRegex: True
78+
- bodyContains:
79+
pattern: '### Description[\n\r]+\[Введите отзыв здесь][\n\r]+###'
80+
isRegex: True
81+
- bodyContains:
82+
pattern: '### Description[\n\r]+\[اكتب ملاحظاتك هنا][\n\r]+###'
83+
isRegex: True
84+
- bodyContains:
85+
pattern: '### Description[\n\r]+\[在此处输入反馈][\n\r]+###'
86+
isRegex: True
87+
- bodyContains:
88+
pattern: '### Description[\n\r]+\[여기에 피드백 입력][\n\r]+###'
89+
isRegex: True
90+
- bodyContains:
91+
pattern: '### Description[\n\r]+\[フィードバックをこちらに入力してください][\n\r]+###'
92+
isRegex: True
93+
then:
94+
- addLabel: 'needs-more-info'
95+
- addReply:
96+
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.
97+
- closeIssue

0 commit comments

Comments
 (0)