Skip to content

Add policy to close empty issues #11213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 85 additions & 2 deletions .github/policies/close-issues.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,97 @@
name: Close issues
description: Close issues based on label.
description: Close issues based on label
resource: repository
where:
configuration:
resourceManagementConfiguration:
eventResponderTasks:
scheduledSearches:
- frequencies:
- daily:
time: 12:00
filters:
- isIssue
- isOpen
- hasLabel:
label: needs-more-info
- noActivitySince:
days: 14
actions:
- addReply:
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.
- closeIssue

eventResponderTasks:
- description: Remove needs-more-info label when author comments on issue
if:
- payloadType: Issue_Comment
- isAction:
action: Created
- isActivitySender:
issueAuthor: True
- hasLabel:
label: needs-more-info
- isOpen
then:
- removeLabel:
label: needs-more-info
triggerOnOwnActions: true

- description: Close issues labeled 'code-of-conduct'
if:
- payloadType: Issues
- hasLabel:
label: code-of-conduct
then:
- closeIssue

- description: Close learn template issues with empty descriptions (spam).
if:
- payloadType: Issues
- or:
- bodyContains:
pattern: '### Description[\n\r]+\[Enter feedback here\][\n\r]+###'
isRegex: True
- bodyContains:
pattern: '### Description[\n\r]+\[Escriba sus comentarios aquí][\n\r]+###'
isRegex: True
- bodyContains:
pattern: '### Description[\n\r]+\[Tapez vos commentaires ici][\n\r]+###'
isRegex: True
- bodyContains:
pattern: '### Description[\n\r]+\[Hier Feedback eingeben][\n\r]+###'
isRegex: true
- bodyContains:
pattern: '### Description[\n\r]+\[Geri bildiriminizi buraya girin][\n\r]+###'
isRegex: True
- bodyContains:
pattern: '### Description[\n\r]+\[Ketikkan umpan balik di sini][\n\r]+###'
isRegex: True
- bodyContains:
pattern: '### Description[\n\r]+\[Immetti qui i commenti][\n\r]+###'
isRegex: True
- bodyContains:
pattern: '### Description[\n\r]+\[Voer hier feedback in][\n\r]+###'
isRegex: True
- bodyContains:
pattern: '### Description[\n\r]+\[Insira comentários aqui][\n\r]+###'
isRegex: True
- bodyContains:
pattern: '### Description[\n\r]+\[Введите отзыв здесь][\n\r]+###'
isRegex: True
- bodyContains:
pattern: '### Description[\n\r]+\[اكتب ملاحظاتك هنا][\n\r]+###'
isRegex: True
- bodyContains:
pattern: '### Description[\n\r]+\[在此处输入反馈][\n\r]+###'
isRegex: True
- bodyContains:
pattern: '### Description[\n\r]+\[여기에 피드백 입력][\n\r]+###'
isRegex: True
- bodyContains:
pattern: '### Description[\n\r]+\[フィードバックをこちらに入力してください][\n\r]+###'
isRegex: True
then:
- addLabel: 'needs-more-info'
- addReply:
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.
- closeIssue