Skip to content

Commit

Permalink
CI: Add stale activity check for issues and PRs GHA (#1689)
Browse files Browse the repository at this point in the history
  • Loading branch information
thrasher- authored Jan 10, 2025
1 parent fcd78ad commit b3e640e
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/stale.yml
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'

0 comments on commit b3e640e

Please sign in to comment.