# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
#
# Best practice: Only mark items stale when responsibility is on the contributor/user, not on maintainers.
# Items with labels indicating maintainer action needed should be exempt from stale automation.
#
# Learn more: https://github.com/actions/stale
name: Close Stale Issues and PRs
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
issues: write
pull-requests: write
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9
with:
# Issues configuration
days-before-issue-stale: 60
days-before-issue-close: 7
stale-issue-message: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
close-issue-message: >
This issue was automatically closed due to inactivity.
If you believe this is still relevant, please reopen it.
stale-issue-label: 'stale'
# Pull requests configuration
days-before-pr-stale: 30
days-before-pr-close: 7
stale-pr-message: >
This pull request has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
close-pr-message: >
This pull request was automatically closed due to inactivity.
If you believe this is still relevant, please reopen it.
stale-pr-label: 'stale'
# Exemptions - Never mark these as stale (maintainer responsibility)
exempt-issue-labels: 'pinned,security,PRD'
exempt-pr-labels: 'pinned,security'
exempt-milestones: true
exempt-assignees: true
# Behavior
remove-stale-when-updated: true
operations-per-run: 100