name: Close Stale Issues
on:
schedule:
# Run daily at 00:00 UTC
- cron: '0 0 * * *'
workflow_dispatch: # Allow manual trigger
permissions:
issues: write
pull-requests: write
jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: Close stale issues and PRs
uses: actions/stale@v10
with:
# Issues
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 has been automatically closed due to inactivity. If you
believe this issue is still relevant, please feel free to reopen it
or create a new one.
stale-issue-label: 'stale'
days-before-issue-stale: 60
days-before-issue-close: 7
# Pull Requests
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 has been automatically closed due to inactivity.
If you believe this PR is still relevant, please feel free to
reopen it or update it.
stale-pr-label: 'stale'
days-before-pr-stale: 30
days-before-pr-close: 7
# Exempt labels
exempt-issue-labels: 'pinned,security,enhancement'
exempt-pr-labels: 'pinned,security'
# Only process issues/PRs
operations-per-run: 30