From b2a311f4f1bc4f7c05584b76a3de7050a6764d63 Mon Sep 17 00:00:00 2001 From: Mario Apra Date: Mon, 21 Oct 2024 17:14:47 +0100 Subject: [PATCH] Add workflow to close stale issues and PRs Introduce a GitHub Actions workflow to automatically close stale issues and pull requests. This helps maintain repository hygiene by reducing clutter from inactive items. The workflow marks issues as stale after 60 days of inactivity and closes them 14 days later if no further activity occurs. The issues and PRs that have a milestone assigned will not be looked at by the bot. This means that it is still possible to plan work that won't be worked for some time. Also, if the tag 'no-stale' is present, it will also be ignored. --- .github/workflows/close-stale.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/close-stale.yml diff --git a/.github/workflows/close-stale.yml b/.github/workflows/close-stale.yml new file mode 100644 index 0000000000..f8fb3e1b5f --- /dev/null +++ b/.github/workflows/close-stale.yml @@ -0,0 +1,23 @@ +name: 'Close stale issues and PRs' +on: + schedule: + - cron: '0 0 * * *' + +permissions: + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + stale-issue-message: 'This issue is stale because it has been open 35 days with no activity. Remove stale label or comment or this will be closed in 14 days.' + stale-pr-message: 'This pull request is stale because it has been open 35 days with no activity. Remove stale label or comment or this will be closed in 14 days.' + days-before-stale: 60 + days-before-close: 14 + exempt-all-milestones: true + exempt-issue-labels: no-stale + exempt-pr-labels: no-stale + delete-branch: true