-
Notifications
You must be signed in to change notification settings - Fork 248
40 lines (37 loc) · 1.44 KB
/
stale.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
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/actions/stale
name: Close issues matching specific labels
on:
workflow_dispatch:
inputs:
debug:
type: boolean
description: 'Dry run. If checked, no issues will actually be modified.'
default: 'true'
message:
required: true
description: 'Message to post onto the issue before closing. Use markdown. For line breaks, you can use <br/>'
labels:
required: true
description: 'Comma separated list of labels. E.g: bug,in-progress,runtime. The [stale] label will always be added to prevent accidentally closing issues.'
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- run: echo "Closing issues that have labels [${{ github.event.inputs.labels }}]. Is this a dry run? ${{ github.event.inputs.debug }}"
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
close-issue-message: ${{ github.event.inputs.message }}
only-labels: "stale,${{ github.event.inputs.labels }}"
days-before-close: 0
debug-only: ${{ github.event.inputs.debug }}
days-before-pr-close: -1
days-before-stale: -1
operations-per-run: 10000