-
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (31 loc) · 1.2 KB
/
cleanup.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
name: "Cleanup issues & PRs"
on:
schedule:
- cron: "42 23 * * *"
workflow_dispatch:
jobs:
lock:
name: 🔒 Lock issues & PRs closed over a year
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v5
with:
github-token: ${{ github.token }}
process-only: "issues, prs"
cleanup:
name: 🧹 Close issues marked as incomplete & older than 14 days
runs-on: ubuntu-latest
steps:
- id: date
run: |
echo "CUTOFF=`date --date='14 days ago' +'%Y-%m-%d'`" >> $GITHUB_OUTPUT
- uses: OctoPrint/actions/close-by-query@main
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
query: "is:issue is:open label:incomplete created:<${{ steps.date.outputs.CUTOFF }}"
comment: >
Since apparently some of the required information is still missing, this will be
closed now, sorry. Feel free to request a reopen of this or create a new issue
once you can provide **all**
[required information](https://github.com/OctoPrint/OctoPrint/blob/master/CONTRIBUTING.md#how-to-file-a-bug-report).
This is nothing personal. Thank you for your collaboration.