ci: Automate closing of context-less issues
Adds a GitHub Actions workflow that automatically communicates the reasons for closing/locking an issue upon labeling it with 'bot:close'.
This commit is contained in:
parent
67baf969b2
commit
316df681d9
|
@ -0,0 +1,70 @@
|
|||
name: Close issues without context
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [ labeled ]
|
||||
|
||||
jobs:
|
||||
|
||||
close-lock:
|
||||
name: Close and lock issues
|
||||
if: contains(github.event.issue.labels.*.name, 'bot:close') && github.event.issue.state == 'open'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Close
|
||||
id: close
|
||||
uses: actions/stale@v6.0.1
|
||||
with:
|
||||
days-before-issue-stale: -1
|
||||
days-before-issue-close: 0
|
||||
stale-issue-label: bot:close
|
||||
close-issue-label: insufficient information
|
||||
close-issue-message: >-
|
||||
To avoid frequent and unnecessary back and forth in issue comments to ask for information that could have
|
||||
been provided right away in the issue description, maintainers created a clear issue template with all the
|
||||
information they need to be able to reproduce common issues, and ask everyone to follow it.
|
||||
|
||||
|
||||
**It appears that this issue description omits all, or critical parts the requested information.**
|
||||
|
||||
|
||||
Maintainers of this project wish they had the superpower to read minds. Alas, they are mere mortals who
|
||||
cannot understand the context in which this problem occurred without information such as:
|
||||
|
||||
|
||||
- your docker-elk configuration
|
||||
- details about your runtime environment
|
||||
- the complete log history of your Elastic components
|
||||
|
||||
|
||||
Therefore, this issue will now be **closed**. Thank you for your understanding. :pray:
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
||||
Next time, please be respectful of maintainers' time by providing the requested information right away. It
|
||||
saves everyone's efforts, and allows them to provide you with a solution with as few round trips as
|
||||
possible.
|
||||
|
||||
# Due to eventual consistency, listing closed issues immediately after a
|
||||
# close does not always yield the expected results. A sleep is a simple
|
||||
# enough remediation to this issue.
|
||||
- name: Pause
|
||||
if: fromJson(steps.close.outputs.closed-issues-prs)[0]
|
||||
run: sleep 5
|
||||
|
||||
- name: Lock
|
||||
uses: dessant/lock-threads@v3
|
||||
if: fromJson(steps.close.outputs.closed-issues-prs)[0]
|
||||
with:
|
||||
process-only: issues
|
||||
issue-inactive-days: 0
|
||||
include-any-issue-labels: bot:close
|
||||
remove-issue-labels: bot:close
|
||||
issue-lock-reason: spam
|
||||
log-output: true
|
Loading…
Reference in New Issue