Skip to content

Instantly share code, notes, and snippets.

@TwiN
Created May 15, 2022 02:56
Show Gist options
  • Save TwiN/f17aa13ed36a1d953809f756599129cd to your computer and use it in GitHub Desktop.
Save TwiN/f17aa13ed36a1d953809f756599129cd to your computer and use it in GitHub Desktop.
GitHub action to close stale issues and pull requests
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4
with:
# Issues
stale-issue-label: 'stale'
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove the `stale` label or comment on this issue, else, this issue be closed in 15 days.'
days-before-issue-stale: 30
days-before-issue-close: 15
# Pull requests
stale-pr-label: 'stale'
stale-pr-message: 'This PR is stale because it has been open for 45 days with no activity. Remove the `stale` label or comment, else this PR will be closed in 30 days.'
days-before-pr-stale: 45
days-before-pr-close: 30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment