From b8ed31527cf8619edbde8ef17dc41bbaca4584b0 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Fri, 22 Nov 2024 13:41:11 +0900 Subject: [PATCH] Add .github/workflows/close-stale-issues.yml: close stale issues automatically With this commit, actions/stale on GitHub will add a label 'stale' on issues (on spantaleev/matrix-docker-ansible-deploy) after 60 days of inactivity and close the stale issues after 7 days of inactivity. Only issues with labels 'question' and/or 'needs-info' will be processed, and ones with a label 'confirmed' will not be processed automatically. Please refer https://github.com/marketplace/actions/close-stale-issues Signed-off-by: Suguru Hirahara --- .github/workflows/close-stale-issues.yml | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/close-stale-issues.yml diff --git a/.github/workflows/close-stale-issues.yml b/.github/workflows/close-stale-issues.yml new file mode 100644 index 000000000..a05a4e3cb --- /dev/null +++ b/.github/workflows/close-stale-issues.yml @@ -0,0 +1,27 @@ +--- +name: 'Close stale issues' +on: # yamllint disable-line rule:truthy + schedule: + - cron: '30 1 * * *' + +permissions: + issues: write + +jobs: + stale: + if: github.repository == 'spantaleev/matrix-docker-ansible-deploy' + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + # Don't process pull requests at all + days-before-pr-stale: -1 + stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.' + close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity. If this issue is still reproduced, feel free to provide the issue with up-to-date information.' + stale-issue-label: 'stale' + # Add this label to exempt the issue from being marked as stale due to inactivity + exempt-issue-labels: 'confirmed' + # An allow-list of label(s) to only process the issues which contain one of these label(s). + any-of-issue-labels: 'question,needs-info' + # Use this to do a dry run from a pull request + # debug-only: true