-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): action to autoclose stale issues and prs
- Loading branch information
Showing
2 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
name: Scheduled | ||
name: Code Audit Check | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
|
@@ -14,3 +15,38 @@ jobs: | |
- uses: rustsec/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
stale: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/stale@v9 | ||
with: | ||
# Utilize a separate token for the stale worker to avoid rate limiting | ||
repo-token: ${{ secrets.STALE_WORKER_TOKEN }} | ||
# This is half the number of operations allowed per hour for the | ||
# GitHub API. | ||
operations-per-run: 2500 | ||
days-before-stale: 45 | ||
days-before-close: 7 | ||
# start with the oldest issues first, as they are most likely to be stale. | ||
ascending: true | ||
stale-issue-label: 'stale' | ||
stale-pr-label: 'stale' | ||
# Allow tagging issues in such a way that they are exempt from the stale check | ||
exempt-issue-labels: 'ignore-stale' | ||
exempt-pr-labels: 'ignore-stale' | ||
# Labels to easily find issues closed because they are stale. | ||
close-issue-label: 'closed-stale' | ||
close-pr-label: 'closed-stale' | ||
stale-issue-message: | | ||
This issue is stale because it has been open 45 days with no activity. Remove stale label or this issue | ||
be closed in 7 days. | ||
close-issue-message: 'This issue was closed because it was stale' | ||
stale-pr-message: | | ||
This PR is stale because it has been open 45 days with no activity. Remove stale label or this PR will be | ||
closed in 7 days. | ||
close-pr-message: 'This PR was closed because it has been stale.' | ||
# Exempt anything added to a milestone from being considered stale | ||
exempt-all-milestones: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: Stale Issue and PR Cleanup | ||
on: | ||
schedule: | ||
- cron: '30 1 * * *' | ||
|
||
jobs: | ||
|