-
Notifications
You must be signed in to change notification settings - Fork 288
39 lines (36 loc) · 1.77 KB
/
stale-labeler.yaml
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
# Stale labeler for PRs and issues
# This action will:
# * Add a label "stale" on issues and PRs after STALE_DAYS of inactivity and comment on them if they also have the "external" label
# * Close the stale issues and pull requests after 7 days of inactivity
# * If an update/comment occur on stale issues or pull requests, the stale label will be removed and the timer will restart if they have the "external" label
# Runs every morning at 1AM: We don't want people having to wait a whole week to get the stale label removed
# Docs: https://github.com/actions/stale
name: 'Stale Labeler and Closer'
on:
schedule:
- cron: '0 1 * * *'
workflow_dispatch:
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
days-before-issue-stale: ${{ env.ISSUE_STALE_DAYS }}
days-before-issue-close: ${{ env.ISSUE_CLOSE_AFTER_DAYS }}
days-before-pr-stale: -1 # With a negative number, this is currently turned off
days-before-pr-close: -1 # With a negative number, this is currently turned off
stale-issue-message: >
There has been no activity on this issue for ${{ env.ISSUE_STALE_DAYS }} days.
Labeling as stale and closing in ${{ env.ISSUE_CLOSE_AFTER_DAYS }} days if no further activity.
stale-pr-message: >
There has been no activity on this PR for ${{ env.PR_STALE_DAYS }} days.
Labeling as stale and closing in ${{ env.PR_CLOSE_AFTER_DAYS }} days if no further activity.
stale-issue-label: 'stale'
stale-pr-label: 'stale'
any-of-issue-labels: 'status/needinfo,priority/p2' # Only checks issues that have any of these labels
env:
ISSUE_STALE_DAYS: 60
ISSUE_CLOSE_AFTER_DAYS: 7
PR_STALE_DAYS: 60
PR_CLOSE_AFTER_DAYS: 7