From abec287058f508df5a9ff5f8ba059f5a5cb21557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Wed, 1 Nov 2023 17:16:00 +0100 Subject: [PATCH] gha: Add workflow to close stale PRs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Our goal. as discussed in the Architecture Committee meeting held on October 31st, 2023, is to take a more aggressive action on issues and PRs that have been opened for a long time. This commit is the very first step, and it's **only** targetting **PRs**. What this action will do is: * Mark all the PRs that have no activity for more than 180 days, starting from May 1st, 2023, as stale. * A message will be added, letting the contributor know that they can simply comment on the PR in order to make it "not stale". * If there's no activity on the PR for 7 days, the PR will be automatically closed. Fixes: #8347 Signed-off-by: Fabiano FidĂȘncio --- .github/workflows/stale.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/stale.yaml diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml new file mode 100644 index 000000000..3f26fdabb --- /dev/null +++ b/.github/workflows/stale.yaml @@ -0,0 +1,17 @@ +name: 'Automatically close stale PRs' +on: + schedule: + - cron: '0 0 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: action/stale@v8 + with: + start-date: '2023-05-01T00:00:00Z' + stale-pr-message: 'This PR has been opened without with no activity for 180 days. Comment on the issue otherwise it will be closed in 7 days' + days-before-pr-stale: 180 + days-before-pr-close: 7 + days-before-issue-stale: -1 + days-before-issue-close: -1