Skip to content

close_stale_pull_requests #171

close_stale_pull_requests

close_stale_pull_requests #171

name: close_stale_pull_requests
on:
schedule:
- cron: '0 1 * * *'
workflow_dispatch: {}
permissions: read-all
jobs:
close_stale_pull_requests:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/stale@f7176fd3007623b69d27091f9b9d4ab7995f0a06 # v5.2.1
with:
days-before-stale: 30
# Do not handle issues at all. We only want to handle PRs.
days-before-issue-stale: -1
stale-pr-message: |
This PR is being marked as stale because it has been open for 30 days with no activity. To rectify, you may do any of the following:
- Push additional commits to the associated branch.
- Remove the stale label.
- Add a comment indicating why it is not stale.
If no action is taken within 7 days, this PR will be closed.
close-pr-message: "This PR was closed because it has been stale for 7 days with no activity."
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}