-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub workflow for actions/stale to label and close stale issues (#4…
- Loading branch information
1 parent
132f9bb
commit 1317f7e
Showing
1 changed file
with
38 additions
and
0 deletions.
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: 'Stale: Label and Close Issues' | ||
on: | ||
schedule: | ||
- cron: '19 * * * *' # Hourly at 19 minutes after the hour (random/uncommon time) | ||
|
||
workflow_dispatch: | ||
# Manual triggering through the GitHub UI, API, or CLI | ||
inputs: | ||
daysBeforeStale: | ||
required: true | ||
default: "2192" | ||
daysBeforeClose: | ||
required: true | ||
default: "30" | ||
operationsPerRun: | ||
required: true | ||
default: "500" | ||
|
||
permissions: | ||
issues: write | ||
|
||
jobs: | ||
stale: | ||
if: github.repository_owner == 'dotnet' # Do not run on forks | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v9 # https://github.com/actions/stale/blob/v9/README.md | ||
with: | ||
ascending: true # Process the oldest issues first | ||
stale-issue-label: 'stale' | ||
stale-issue-message: "Due to lack of recent activity, this issue has been labeled as 'stale'. It will be closed if no further activity occurs within 30 more days. Any new comment will remove the label." | ||
close-issue-message: "This issue will now be closed since it has been labeled 'stale' without activity for 30 days." | ||
days-before-stale: ${{ fromJson(inputs.daysBeforeStale || 2192) }} # Default to 6 years if not specified as input | ||
days-before-close: ${{ fromJson(inputs.daysBeforeClose || 30 ) }} # Default to 30 days if not specified as input | ||
days-before-pr-stale: -1 # Do not label PRs as 'stale' | ||
days-before-pr-close: -1 # Do not close PRs labeled as 'stale' | ||
operations-per-run: ${{ fromJson(inputs.operationsPerRun || 500 )}} |