From 60782b57bdbe09af7cfe1232b827b4668ca92bb9 Mon Sep 17 00:00:00 2001 From: Andrew Nester Date: Thu, 2 Jan 2025 14:23:00 +0100 Subject: [PATCH] Added close stale issues workflow (#634) ## Changes Added workflows for closing stale issues. It adds a Github Action that warns and then auto closes stale issues. --- .github/workflows/close-stale-issues.yml | 36 ++++++++++++++++++++++++ 1 file changed, 36 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..ffe550132 --- /dev/null +++ b/.github/workflows/close-stale-issues.yml @@ -0,0 +1,36 @@ +name: "Close Stale Issues" + +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * *" # Run at midnight every day + +jobs: + cleanup: + permissions: + issues: write + contents: read + pull-requests: write + runs-on: ubuntu-latest + name: Stale issue job + steps: + - uses: actions/stale@v9 + with: + stale-issue-message: This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. + stale-pr-message: This PR has not received an update in a while. If you want to keep this PR open, please leave a comment below or push a new commit and auto-close will be canceled. + + # These labels are required + stale-issue-label: Stale + stale-pr-label: Stale + + exempt-issue-labels: No Autoclose + exempt-pr-labels: No Autoclose + + # Issue timing + days-before-stale: 30 + days-before-close: 7 + + repo-token: ${{ secrets.GITHUB_TOKEN }} + loglevel: DEBUG + # TODO: Remove dry-run after merge when confirmed it works correctly + dry-run: true