-
Notifications
You must be signed in to change notification settings - Fork 822
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Add stale activity check for issues and PRs GHA (#1689)
- Loading branch information
Showing
1 changed file
with
42 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,42 @@ | ||
name: stale-checks | ||
on: | ||
schedule: | ||
- cron: '0 0 * * 1-5' | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
DAYS_BEFORE_STALE: ${{ vars.DAYS_BEFORE_STALE }} | ||
DAYS_BEFORE_CLOSE: ${{ vars.DAYS_BEFORE_CLOSE }} | ||
EXEMPT_ISSUE_LABELS: ${{ vars.EXEMPT_ISSUE_LABELS }} | ||
EXEMPT_PR_LABELS: ${{ vars.EXEMPT_PR_LABELS }} | ||
|
||
jobs: | ||
stale: | ||
name: Stale issues and PRs check | ||
runs-on: ubuntu-latest | ||
environment: ci | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/stale@v9 | ||
with: | ||
# General settings | ||
days-before-stale: ${{ env.DAYS_BEFORE_STALE }} | ||
days-before-close: ${{ env.DAYS_BEFORE_CLOSE }} | ||
exempt-issue-labels: ${{ env.EXEMPT_ISSUE_LABELS }} | ||
exempt-pr-labels: ${{ env.EXEMPT_PR_LABELS }} | ||
enable-statistics: true | ||
|
||
# Issue settings | ||
stale-issue-message: 'This issue is stale because it has been open ${{ env.DAYS_BEFORE_STALE }} days with no activity. Please provide an update or this issue will be automatically closed in ${{ env.DAYS_BEFORE_CLOSE }} days.' | ||
close-issue-message: 'This issue was closed because it has been stalled for ${{ env.DAYS_BEFORE_CLOSE }} days with no activity.' | ||
stale-issue-label: 'stale' | ||
|
||
# PR settings | ||
stale-pr-message: 'This PR is stale because it has been open ${{ env.DAYS_BEFORE_STALE }} days with no activity. Please provide an update on the progress of this PR.' | ||
days-before-pr-close: -1 | ||
stale-pr-label: 'stale' |