Skip to content

Commit 02f3298

Browse files
authored
Adding github action workflow to mark stale issues and prs. (#62)
* Create stale.yml Adding github action workflow to mark stale issues and prs. This stale management workflow will add stale label and post reminder message after 14 days of inactivity and further close issue/pr after another 14 days of inactivity. We can also override stale action by adding override-stale label. Thanks! cc @google/gtech-llm-support * Update stale.yml * Update stale.yml
1 parent 837d237 commit 02f3298

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/stale.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
2+
#
3+
# You can adjust the behavior by modifying this file.
4+
# For more information, see:
5+
# https://github.com/actions/stale
6+
name: Mark stale issues and pull requests
7+
8+
on:
9+
schedule:
10+
# Scheduled to run at 1.30 UTC everyday
11+
- cron: '30 1 * * *'
12+
13+
jobs:
14+
stale:
15+
16+
runs-on: ubuntu-latest
17+
permissions:
18+
issues: write
19+
pull-requests: write
20+
21+
steps:
22+
- uses: actions/stale@v5
23+
with:
24+
repo-token: ${{ secrets.GITHUB_TOKEN }}
25+
days-before-issue-stale: 14
26+
days-before-issue-close: 14
27+
stale-issue-label: "stale"
28+
close-issue-reason: completed
29+
any-of-labels: "status:awaiting user response,status:more data needed"
30+
stale-issue-message: >
31+
Marking this issue as stale since it has been open for 14 days with no activity.
32+
This issue will be closed if no further activity occurs.
33+
close-issue-message: >
34+
This issue was closed because it has been inactive for 28 days.
35+
Please post a new issue if you need further assistance. Thanks!
36+
days-before-pr-stale: 14
37+
days-before-pr-close: 14
38+
stale-pr-label: "stale"
39+
stale-pr-message: >
40+
Marking this pull request as stale since it has been open for 14 days with no activity.
41+
This PR will be closed if no further activity occurs.
42+
close-pr-message: >
43+
This pull request was closed because it has been inactive for 28 days.
44+
Please open a new pull request if you need further assistance. Thanks!
45+
# Label that can be assigned to issues to exclude them from being marked as stale
46+
exempt-issue-labels: 'override-stale'
47+
# Label that can be assigned to PRs to exclude them from being marked as stale
48+
exempt-pr-labels: "override-stale"
49+

0 commit comments

Comments
 (0)