Skip to content
This repository was archived by the owner on Sep 28, 2024. It is now read-only.

Commit 874d466

Browse files
committed
chore(stalebot): add bot config to manage issues & PRs
1 parent 477a404 commit 874d466

File tree

1 file changed

+115
-0
lines changed

1 file changed

+115
-0
lines changed

.github/workflows/stale.yml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: 'Stale Bot'
2+
on:
3+
schedule:
4+
# Execute Daily at 7:15 AM UTC
5+
- cron: '15 7 * * *'
6+
7+
# Default token permissions = None
8+
permissions: {}
9+
10+
11+
jobs:
12+
stale:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
issues: write
17+
pull-requests: write
18+
actions: write # required to delete/update cache
19+
env:
20+
STALE_ISSUE_WARNING_DAYS: 90
21+
STALE_ISSUE_CLOSURE_DAYS: 7
22+
STALE_PR_WARNING_DAYS: 60
23+
STALE_PR_CLOSURE_DAYS: 10
24+
UNRESPONSIVE_WARNING_DAYS: 14
25+
UNRESPONSIVE_CLOSURE_DAYS: 7
26+
REMINDER_WINDOW: 60
27+
OPERATIONS_RATE_LIMIT: 330 # 1000 api/hr / 3 jobs
28+
steps:
29+
30+
- name: Stale Issues/PRs
31+
uses: actions/stale@v9
32+
with:
33+
# default: 30, GitHub Actions API Rate limit is 1000/hr
34+
operations-per-run: ${{ env.OPERATIONS_RATE_LIMIT }}
35+
# exempt-all-milestones: false (default)
36+
# exempt-all-assignees: false (default)
37+
stale-issue-label: stale
38+
days-before-issue-stale: ${{ env.STALE_ISSUE_WARNING_DAYS }}
39+
days-before-issue-close: ${{ env.STALE_ISSUE_CLOSURE_DAYS }}
40+
exempt-issue-labels: confirmed, help-wanted
41+
stale-issue-message: >
42+
This issue is stale because it has not been confirmed or planned by the maintainers
43+
and has been open ${{ env.STALE_ISSUE_WARNING_DAYS }} days with no recent activity.
44+
It will be closed in ${{ env.STALE_ISSUE_CLOSURE_DAYS }} days, if no further
45+
activity occurs. Thank you for your contributions.
46+
close-issue-message: >
47+
This issue was closed due to lack of activity.
48+
49+
# PR Configurations
50+
stale-pr-label: stale
51+
days-before-pr-stale: ${{ env.STALE_PR_WARNING_DAYS }}
52+
days-before-pr-close: ${{ env.STALE_PR_CLOSURE_DAYS }}
53+
exempt-pr-labels: confirmed, dependabot
54+
stale-pr-message: >
55+
This PR is stale because it has not been confirmed or considered ready for merge
56+
by the maintainers but has been open ${{ env.STALE_PR_WARNING_DAYS }} days with
57+
no recent activity. It will be closed in ${{ env.STALE_PR_CLOSURE_DAYS }} days,
58+
if no further activity occurs. Please make sure to add the proper testing, docs,
59+
and descriptions of changes before your PR can be merged. Thank you for your
60+
contributions.
61+
close-pr-message: >
62+
This PR was closed due to lack of activity.
63+
64+
- name: Unresponsive Issues/PRs
65+
# Closes issues rapidly when submitter is unresponsive. The timer is initiated
66+
# by maintainer by placing the awaiting-reply label on the issue or PR. From
67+
# that point the submitter has 14 days before a reminder/warning is given. If
68+
# no response has been received within 3 weeks, the issue is closed. There are
69+
# no exemptions besides removing the awaiting-reply label.
70+
uses: actions/stale@v9
71+
with:
72+
# GitHub Actions API Rate limit is 1000/hr
73+
operations-per-run: ${{ env.OPERATIONS_RATE_LIMIT }}
74+
only-labels: awaiting-reply
75+
stale-issue-label: unresponsive
76+
stale-pr-label: unresponsive
77+
remove-stale-when-updated: awaiting-reply
78+
days-before-stale: ${{ env.UNRESPONSIVE_WARNING_DAYS }}
79+
days-before-close: ${{ env.UNRESPONSIVE_CLOSURE_DAYS }}
80+
stale-issue-message: >
81+
This issue has not received a response in ${{ env.UNRESPONSIVE_WARNING_DAYS }} days.
82+
If no response is received in ${{ env.UNRESPONSIVE_CLOSURE_DAYS }} days, it will be
83+
closed. We look forward to hearing from you.
84+
close-issue-message: >
85+
This issue was closed because no response was received.
86+
stale-pr-message: >
87+
This PR has not received a response in ${{ env.UNRESPONSIVE_WARNING_DAYS }} days.
88+
If no response is received in ${{ env.UNRESPONSIVE_CLOSURE_DAYS }} days, it will be
89+
closed. We look forward to hearing from you.
90+
close-pr-message: >
91+
This PR was closed because no response was received.
92+
93+
- name: Reminders on Confirmed Issues/PRs
94+
# Posts a reminder when confirmed issues are not updated in a timely manner.
95+
# The timer is initiated by a maintainer by placing the confirmed label on
96+
# the issue or PR (which prevents stale closure), however, to prevent it being
97+
# forgotten completely, this job will post a reminder message to the maintainers
98+
# No closures will occur and there are no exemptions besides removing the confirmed
99+
# label.
100+
uses: actions/stale@v9
101+
with:
102+
# GitHub Actions API Rate limit is 1000/hr
103+
operations-per-run: ${{ env.OPERATIONS_RATE_LIMIT }}
104+
only-labels: confirmed
105+
stale-issue-label: needs-update
106+
stale-pr-label: needs-update
107+
days-before-stale: ${{ env.REMINDER_WINDOW }}
108+
days-before-close: -1 # never close
109+
stale-issue-message: >
110+
It has been ${{ env.REMINDER_WINDOW }} days since the last update on this confirmed
111+
issue. @python-semantic-release/team can you provide an update on the status of this
112+
issue?
113+
stale-pr-message: >
114+
It has been ${{ env.REMINDER_WINDOW }} days since the last update on this confirmed
115+
PR. @python-semantic-release/team can you provide an update on the status of this PR?

0 commit comments

Comments
 (0)