-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (46 loc) · 1.96 KB
/
clean-issues.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
# Autonomy
# Next-generation redistributive finance
#
# Handcrafted since 2022 by Autonomy Organisation <info@autonomy.org>
#
# This Github Actions script aims at pruning pending issues and pull requests.
#
# Credits:
name: Clean up inactive issues and pull requests
on:
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
- cron: "0 12 * * *"
env:
DAYS_BEFORE_CLOSE: 14
DAYS_BEFORE_STALE: 180
permissions:
issues: write
pull-requests: write
jobs:
prune-issues-and-pull-requests:
name: "Issues"
runs-on: "ubuntu-latest"
steps:
- name: "Prune issues and pull requests"
uses: "actions/stale@v5"
with:
days-before-close: "${{ env.DAYS_BEFORE_CLOSE }}"
days-before-stale: "${{ env.DAYS_BEFORE_STALE }}"
repo-token: "${{ secrets.GITHUB_TOKEN }}"
stale-issue-label: "stale"
stale-issue-message: |
Since this issue has not had any activity within the last ${{ env.DAYS_BEFORE_STALE }} days, it is now considered as stale.
If no further activity occurs within the next ${{ env.DAYS_BEFORE_CLOSE }} days, this stale issue will be removed.
stale-pr-label: "stale"
stale-pr-message: |
Since this pull request (PR) had no activity within the last ${{ env.DAYS_BEFORE_STALE }} days, it is now marked as stale.
If no further activity occurs within the next ${{ env.DAYS_BEFORE_CLOSE }} days, this PR will be closed.