Skip to content

Commit 4f6983d

Browse files
sfanahataShannon Anahata
andauthored
feat(stalebot): Add stale PR automation workflow (#17434)
## DESCRIBE YOUR PR - Add workflow to mark PRs stale after 45 days of inactivity - Auto-close PRs 7 days after being marked stale - Exempt draft PRs, dependabot PRs, and PRs with 'do-not-close' label - Add 'do-not-close' label definition - Update dependabot .yml to label so we can exempt their PRs ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [x] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) Co-authored-by: Shannon Anahata <shannonanahata@gmail.com>
1 parent be10512 commit 4f6983d

3 files changed

Lines changed: 59 additions & 3 deletions

File tree

.github/dependabot.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ updates:
88
interval: daily
99
reviewers:
1010
- '@getsentry/docs'
11-
labels: []
11+
labels:
12+
- dependencies
1213
# Group dependency updates together in one PR
1314
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#groups
1415
groups:
@@ -31,11 +32,15 @@ updates:
3132
schedule:
3233
# Check for updates to GitHub Actions every week
3334
interval: 'daily'
35+
labels:
36+
- dependencies
3437

3538
- package-ecosystem: gitsubmodule
3639
directory: '/'
3740
schedule:
3841
interval: daily
3942
open-pull-requests-limit: 10
4043
reviewers:
41-
- AbhiPrasad
44+
- '@getsentry/docs'
45+
labels:
46+
- dependencies

.github/labels.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@
8585
- name: 'Platform: Xamarin'
8686
color: '584774'
8787

88-
8988
# Waiting for Labels
9089
- name: 'Waiting for: Support'
9190
color: '8D5494'
@@ -267,6 +266,11 @@
267266
color: '584774'
268267
description: PRs touching develop-docs/sdk
269268

269+
# Stale PR management
270+
- name: do-not-close
271+
color: 0E8A16
272+
description: Prevents automatic closure of stale PRs
273+
270274
# Miscellaneous
271275
- name: API Docs
272276
color: 649B42

.github/workflows/stale-prs.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Close stale PRs
2+
3+
on:
4+
schedule:
5+
- cron: '0 3 * * *' # Daily at 3:00 AM UTC
6+
workflow_dispatch:
7+
8+
permissions:
9+
pull-requests: write
10+
11+
jobs:
12+
stale:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/stale@v9
16+
with:
17+
# Only target PRs, not issues
18+
days-before-issue-stale: -1
19+
days-before-issue-close: -1
20+
21+
stale-pr-message: |
22+
This pull request has been automatically marked as stale because it has not had recent activity.
23+
It will be closed in 7 days if no further activity occurs.
24+
25+
If this PR is still relevant, please:
26+
- Push new commits, or
27+
- Leave a comment to keep it open
28+
29+
Thank you for your contribution!
30+
close-pr-message: |
31+
This pull request has been automatically closed due to inactivity.
32+
33+
If you'd like to continue working on this, feel free to reopen the PR or create a new one.
34+
35+
# Timing
36+
days-before-stale: 45
37+
days-before-close: 7
38+
39+
# Labels
40+
stale-pr-label: 'Stale'
41+
42+
# Exemptions
43+
exempt-draft-pr: true
44+
exempt-pr-labels: 'do-not-close,dependencies'
45+
46+
# Processing
47+
operations-per-run: 100

0 commit comments

Comments
 (0)