Skip to content

close_stale_pull_requests #619

close_stale_pull_requests

close_stale_pull_requests #619

name: close_stale_pull_requests
on:
schedule:
- cron: '0 1 * * *'
workflow_dispatch: {}
permissions: read-all
jobs:
close_stale_pull_requests:
runs-on: ubuntu-22.04
permissions:
pull-requests: write
steps:
- uses: actions/stale@v5
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 }}