Skip to content

Close stale issues and PRs #16

Close stale issues and PRs

Close stale issues and PRs #16

Workflow file for this run

name: 'Close stale issues and PRs'
on:
schedule:
- cron: "30 1 * * *"
env:
DAYS_BEFORE_ISSUE_STALE: 30
DAYS_BEFORE_ISSUE_CLOSE: 30
DAYS_BEFORE_PR_STALE: 30
DAYS_BEFORE_PR_CLOSE: 30
jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v8
with:
days-before-issue-stale: ${{ env.DAYS_BEFORE_ISSUE_STALE }}
days-before-issue-close: ${{ env.DAYS_BEFORE_ISSUE_CLOSE }}
days-before-pr-stale: ${{ env.DAYS_BEFORE_PR_STALE }}
days-before-pr-close: ${{ env.DAYS_BEFORE_PR_CLOSE }}
stale-issue-label: "Inactive Issue"
stale-issue-message: 'This issue is stale because it has been open ${{ env.DAYS_BEFORE_ISSUE_STALE }} days with no activity. Remove stale label or comment or this will be closed in ${{ env.DAYS_BEFORE_ISSUE_CLOSE }} days.'
stale-pr-message: 'This PR is stale because it has been open ${{ env.DAYS_BEFORE_PR_STALE }} days with no activity. Remove stale label or comment or this will be closed in ${{ env.DAYS_BEFORE_PR_CLOSE }} days.'
close-issue-message: 'This issue was closed because it has been stalled for ${{ env.DAYS_BEFORE_ISSUE_CLOSE }} days with no activity.'
close-pr-message: 'This PR was closed because it has been stalled for ${{ env.DAYS_BEFORE_PR_CLOSE }} days with no activity.'
exempt-issue-labels: "Active Issue"
repo-token: ${{ secrets.GITHUB_TOKEN }}