forked from prisma/prisma
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauto-close-github-discussions.yml
More file actions
45 lines (34 loc) · 1.12 KB
/
auto-close-github-discussions.yml
File metadata and controls
45 lines (34 loc) · 1.12 KB
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
name: Auto Close Stale Discussions
on:
schedule:
- cron: '0 0 * * *' # Runs daily at midnight UTC
workflow_dispatch: # Enables manual run from the Actions tab
permissions:
contents: read
discussions: write
jobs:
close-discussions:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup PNPM
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '20.19.0'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run inline Discussion Cleanup Script
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CLOSING_MESSAGE: |
Hi,
As we have not heard back from you, we are closing this discussion to keep our discussions organized.
Feel free to start a new discussion if this remains relevant.
Thank you for being part of the community!
run: node ./.github/workflows/scripts/auto-close-github-discussions.js