Skip to content

Commit e8e728b

Browse files
authored
ci: add github workflow to close stale issues (bugs) and PRs (#1450)
1 parent 3c85cfd commit e8e728b

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# https://github.com/actions/stale
5+
# This workflow is used to close stale issues and PRs after 30 days of inactivity.
6+
# Scheduled to run every day at 1:30 AM PST.
7+
# Configured to close issues with the label 'bug' after 30 days of inactivity.
8+
# Configured to close all PRs after 30 days of inactivity.
9+
# Configured to close the issue and PR after 5 days of inactivity.
10+
# Configured to delete the branch of the PR after 5 days of inactivity.
11+
12+
13+
name: 'Close stale issues and PRs'
14+
on:
15+
schedule:
16+
- cron: '30 9 * * *'
17+
18+
permissions:
19+
actions: write
20+
contents: write # only for delete-branch option
21+
issues: write
22+
pull-requests: write
23+
24+
jobs:
25+
stale:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/stale@v9
29+
with:
30+
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
31+
close-issue-message: 'This issue has been closed due to inactivity. If you believe this issue is still relevant, please feel free to reopen it with additional context or information.'
32+
stale-pr-message: 'This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
33+
close-pr-message: 'This PR has been closed due to inactivity. If you believe this PR is still relevant, please feel free to reopen it with additional context or information.'
34+
delete-branch: true
35+
days-before-stale: 30
36+
days-before-close: 5
37+
any-of-issue-labels: 'bug'

0 commit comments

Comments
 (0)