Skip to content

Commit d4acec6

Browse files
committed
feat: add reusable workflow for 'stale'
1 parent b66b56d commit d4acec6

3 files changed

Lines changed: 34 additions & 25 deletions

File tree

.github/stale.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/maintenance.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
- .github/labels.json
1313
- .github/workflows/label-sync.yml
1414
- .github/workflows/maintenance.yml
15+
- .github/workflows/stale.yml
1516
workflow_dispatch:
1617

1718
concurrency:
@@ -27,3 +28,6 @@ permissions:
2728
jobs:
2829
labels:
2930
uses: ./.github/workflows/label-sync.yml
31+
32+
stale:
33+
uses: ./.github/workflows/stale.yml

.github/workflows/stale.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Close Stale Issues and PRs
3+
# https://github.com/actions/stale
4+
5+
on:
6+
workflow_call:
7+
8+
permissions:
9+
contents: write # only for delete-branch option
10+
issues: write
11+
pull-requests: write
12+
13+
jobs:
14+
stale:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/stale@v8
18+
with:
19+
stale-issue-message: 'This issue has been automatically marked as stale/inactive because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
20+
stale-pr-message: 'This pull request has been automatically marked as stale/inactive because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
21+
close-issue-message: 'This issue was closed because it has been stalled/inactive for too long. Thank you for your contributions.'
22+
close-pr-message: 'This pull request was closed because it has been stalled/inactive for too long. Thank you for your contributions.'
23+
days-before-issue-stale: 730
24+
days-before-issue-close: 30
25+
days-before-pr-stale: 730
26+
days-before-pr-close: 365
27+
stale-issue-label: 'state: inactive'
28+
exempt-issue-labels: 'pinned,security,type: security'
29+
stale-pr-label: 'state: inactive'
30+
exempt-pr-labels: 'pinned,security,type: security'

0 commit comments

Comments
 (0)