Skip to content

Commit d95fac0

Browse files
amirhcopybara-github
authored andcommitted
chore: Automate closing of stale issues
This commit updates the GitHub Actions workflow to automatically manage and close stale issues that are awaiting a user response. The workflow now performs the following actions: - Marks issues with the "status:awaiting user response" label as stale after 7 days of inactivity. - Posts a comment notifying that the issue will be closed if no further activity occurs. - Closes the issue if there is no activity for an additional 2 days. PiperOrigin-RevId: 788946450
1 parent 4865b93 commit d95fac0

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/stale.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflow warns and then closes issues that have had no activity for a specified amount of time.
2+
name: Mark and close stale issues
3+
4+
on:
5+
schedule:
6+
# Scheduled to run at 1:30 UTC everyday
7+
- cron: '30 1 * * *'
8+
9+
jobs:
10+
stale:
11+
12+
runs-on: ubuntu-latest
13+
permissions:
14+
issues: write
15+
16+
steps:
17+
- uses: actions/stale@v5
18+
with:
19+
repo-token: ${{ secrets.GITHUB_TOKEN }}
20+
days-before-issue-stale: 7
21+
days-before-issue-close: 2
22+
stale-issue-label: "status:stale"
23+
close-issue-reason: not_planned
24+
any-of-labels: "status:awaiting user response"
25+
stale-issue-message: >
26+
This issue has been marked as stale because it has been open for 7 days with no activity. It will be closed in 2 days if no further activity occurs.
27+
close-issue-message: >
28+
This issue was closed because it has been inactive for 9 days.
29+
Please post a new issue if you need further assistance. Thanks!
30+
# Label that can be assigned to issues to exclude them from being marked as stale
31+
exempt-issue-labels: 'override-stale'

0 commit comments

Comments
 (0)