Skip to content

Commit 2ea886d

Browse files
Periodically clean up stale issues and pull requests (#1779)
Implements https://github.com/actions/stale to clean up PRs and issues that have been sitting for over 180 days without any sort of activity. Prompts users to rebase their PRs or bump their issues with interest. This is the same action we use to keep our monorepo tidy
1 parent cd279e3 commit 2ea886d

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/stale.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Mark stale issues and pull requests
2+
3+
on:
4+
schedule:
5+
- cron: '40 4 * * *'
6+
7+
jobs:
8+
stale:
9+
runs-on: ubuntu-latest
10+
timeout-minutes: 30
11+
permissions:
12+
issues: write
13+
pull-requests: write
14+
15+
steps:
16+
# https://github.com/actions/stale
17+
- uses: actions/stale@v5
18+
with:
19+
repo-token: ${{ secrets.GITHUB_TOKEN }}
20+
days-before-stale: 180
21+
days-before-close: 14
22+
stale-issue-message: >
23+
This issue has been inactive for over 180 days. It will be automatically closed in 14 days.
24+
Label this issue as "never-stale" to exempt it from this check.
25+
26+
—[Mark stale](https://github.com/mixpanel/docs/actions/workflows/stale.yaml)
27+
stale-pr-message: >
28+
This PR has been inactive for over 180 days. It will be automatically closed in 14 days.
29+
Label this PR as "never-stale" to exempt it from this check.
30+
31+
—[Mark stale](https://github.com/mixpanel/docs/actions/workflows/stale.yaml)
32+
stale-issue-label: 'stale'
33+
stale-pr-label: 'stale'
34+
exempt-pr-labels: never-stale

0 commit comments

Comments
 (0)