From 58a98d97d1ec517cdf8fbf5ab45683f8fadee9bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Leh=C3=B3czky?= Date: Wed, 17 Apr 2024 02:30:06 +0200 Subject: [PATCH] Adding GitHub Actions workflow to close stale PRs (#15710) --- .github/workflows/close_stale_prs.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/close_stale_prs.yml diff --git a/.github/workflows/close_stale_prs.yml b/.github/workflows/close_stale_prs.yml new file mode 100644 index 00000000000..b78897a8809 --- /dev/null +++ b/.github/workflows/close_stale_prs.yml @@ -0,0 +1,26 @@ +# Labels PRs without updates for 60 days as stale, then closes them 15 days later. +name: Close stale PRs + +on: + schedule: + # Every day at 1:39 AM UTC. A random time to avoid GitHub Actions being overloaded by scheduled workflows. + - cron: '39 1 * * *' + +jobs: + close-stale-prs: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + stale-pr-message: > + It seems that this pull request didn't really move for quite a while. Is this something you'd like to + revisit any time soon or should we close? Pleaes comment if you'd like to pick it up and remove the + "stale" label. + stale-pr-label: stale + # Not marking issues as stale. + days-before-issue-stale: -1 + # Close the PR 15 days after marking it as stale. + days-before-close: 15 + close-pr-message: > + Closing this pull request because it has been stale for very long. If you think this is still relevant, + feel free to reopen it.