diff --git a/.github/workflows/stale_pull_requests.yml b/.github/workflows/stale_pull_requests.yml new file mode 100644 index 000000000000..0780405686eb --- /dev/null +++ b/.github/workflows/stale_pull_requests.yml @@ -0,0 +1,34 @@ +name: 'Close stale pull requests' +on: + schedule: + - cron: '30 1 * * *' + workflow_dispatch: + +jobs: + stale: + if: ${{ github.repository_owner == 'pytorch' }} + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v3 + with: + stale-pr-message: > + Looks like this PR hasn't been updated in a while! Going to go ahead and mark this as `stale`. + Feel free to update / remove the `stale` label if you feel this is a mistake + `stale` pull requests will automatically be closed 30 days after being marked `stale` + exempt-pr-labels: "no-stale,open source,high priority" + days-before-stale: 60 + days-before-close: 90 + stale-open-source: + if: ${{ github.repository_owner == 'pytorch' }} + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v3 + with: + stale-pr-message: > + Looks like this PR hasn't been updated in a while! Going to go ahead and mark this as `stale`. + Feel free to update / remove the `stale` label if you feel this is a mistake + `stale` pull requests will automatically be closed 30 days after being marked `stale` + exempt-pr-labels: "no-stale,high priority" + only-labels: "open source" + days-before-stale: 150 + days-before-close: 180