-
Notifications
You must be signed in to change notification settings - Fork 6.8k
57 lines (45 loc) · 1.88 KB
/
spam-issue-close.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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@v9.0.0
with:
days-before-issue-stale: -1
days-before-issue-close: 0
stale-issue-label: bot:close
close-issue-label: insufficient information
close-issue-message: >-
This description omits all, or critical parts of the information requested by maintainers to be able to
reproduce the issue:
- the **complete** log history of your Elastic components, including `setup`.
- any change(s) performed to the docker-elk configuration.
- details about the runtime environment, for both Docker and Compose.
Therefore, this issue will now be **closed**. Please open a new issue and fill in the template. It saves
everyone's efforts, and allows maintainers to provide you with a solution in as few round trips as possible.
Thank you for your understanding. :pray:
# 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@v5
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