From c7f18fd48918df24d63720621da28a710d81f649 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Wed, 30 Apr 2025 16:16:50 +0200 Subject: [PATCH] ci: add optimized stale and lock workflows --- .github/workflows/lock-threads.yaml | 17 ++++++++++++++++ .github/workflows/stale-threads.yaml | 30 ++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 .github/workflows/lock-threads.yaml create mode 100644 .github/workflows/stale-threads.yaml diff --git a/.github/workflows/lock-threads.yaml b/.github/workflows/lock-threads.yaml new file mode 100644 index 000000000..9ed352353 --- /dev/null +++ b/.github/workflows/lock-threads.yaml @@ -0,0 +1,17 @@ +name: Lock inactive threads + +on: + schedule: + - cron: '0 1 * * *' + +jobs: + lock-threads: + runs-on: ubuntu-latest + steps: + - name: Lock threads after 30 days of inactivity + uses: dessant/lock-threads@v5 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + issue-inactive-days: 30 + pr-inactive-days: 30 + discussion-inactive-days: 30 diff --git a/.github/workflows/stale-threads.yaml b/.github/workflows/stale-threads.yaml new file mode 100644 index 000000000..2750678c4 --- /dev/null +++ b/.github/workflows/stale-threads.yaml @@ -0,0 +1,30 @@ +name: Manage stale threads + +on: + schedule: + - cron: '0 2 * * *' + +jobs: + stale-threads: + runs-on: ubuntu-latest + steps: + - name: Manage stale threads (Issues & PRs) + uses: actions/stale@v9 + with: + stale-issue-message: | + This issue has been marked as stale due to inactivity. It will be automatically closed in 7 days if no update is received. + + Please provide the requested information to keep the issue active. + stale-pr-message: | + This pull request has been marked as stale due to inactivity. It will be automatically closed in 7 days if no update is received. + + To keep this PR active: + - Update your changes based on the requested feedback + - Leave a comment with your progress or questions + days-before-stale: 14 + stale-issue-label: '⏱︎ Stale' + stale-pr-label: '⏱︎ Stale' + only-labels: '💤 Waiting for feedback, 💤 Waiting for changes' + remove-stale-when-updated: true + operations-per-run: 100 + labels-to-remove-when-unstale: '⏱︎ Stale, 💤 Waiting for feedback, 💤 Waiting for changes'