Skip to content

Mark stale issues and PRs #366

Mark stale issues and PRs

Mark stale issues and PRs #366

Workflow file for this run

name: 'Mark stale issues and PRs'
permissions:
contents: read
issues: write
pull-requests: write
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
stale:
runs-on: ubuntu-latest
env:
DAYS_BEFORE_ISSUE_STALE: 21
DAYS_BEFORE_ISSUE_CLOSE: 14
DAYS_BEFORE_PR_STALE: 10
DAYS_BEFORE_PR_CLOSE: 7
OPERATIONS_PER_RUN: 90
steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
operations-per-run: ${{ env.OPERATIONS_PER_RUN }}
# Issues
days-before-issue-stale: ${{ env.DAYS_BEFORE_ISSUE_STALE }}
days-before-issue-close: ${{ env.DAYS_BEFORE_ISSUE_CLOSE }}
stale-issue-label: 'stale'
stale-issue-message: 'This issue has been inactive for ${{ env.DAYS_BEFORE_ISSUE_STALE }} days and is now marked as stale. It will be closed in ${{ env.DAYS_BEFORE_ISSUE_CLOSE }} days if there is no further activity.'
close-issue-message: 'Closing this issue due to inactivity. Please reopen it or create a new issue if this is still relevant.'
exempt-issue-labels: 'pinned,security,do-not-close'
# PRs
days-before-pr-stale: ${{ env.DAYS_BEFORE_PR_STALE }}
days-before-pr-close: ${{ env.DAYS_BEFORE_PR_CLOSE }}
stale-pr-label: 'stale'
stale-pr-message: 'This PR has been inactive for ${{ env.DAYS_BEFORE_PR_STALE }} days and is now marked as stale. It will be closed in ${{ env.DAYS_BEFORE_PR_CLOSE }} days if there is no further activity.'
close-pr-message: 'Closing this PR due to inactivity. Please reopen it or create a new PR if this is still relevant.'