From 9f01f9469e988b264e68714fb9e03c5aed6b03f4 Mon Sep 17 00:00:00 2001 From: VdustR Date: Wed, 11 Mar 2026 11:11:25 +0800 Subject: [PATCH 1/4] ci: add stale branch cleanup workflow Co-Authored-By: Claude Opus 4.6 --- .github/workflows/stale-branches.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/stale-branches.yml diff --git a/.github/workflows/stale-branches.yml b/.github/workflows/stale-branches.yml new file mode 100644 index 0000000..64dc0e9 --- /dev/null +++ b/.github/workflows/stale-branches.yml @@ -0,0 +1,22 @@ +name: Stale Branches + +on: + schedule: + # Run daily at 2:00 AM UTC (10:00 AM Taiwan time) + - cron: "0 2 * * *" + workflow_dispatch: {} # Allow manual trigger + +jobs: + stale-branches: + name: Delete Stale Branches + runs-on: ubuntu-22.04 + permissions: + contents: write + issues: write + pull-requests: read + steps: + - uses: crs-k/stale-branches@v8.2.2 + with: + days-before-stale: 7 + days-before-delete: 7 + pr-check: true From d1a18ebc1e8b117dd4ef542b955605116732d967 Mon Sep 17 00:00:00 2001 From: VdustR Date: Wed, 11 Mar 2026 11:14:59 +0800 Subject: [PATCH 2/4] ci: remove unnecessary issues:write and add deletion grace period Co-Authored-By: Claude Opus 4.6 --- .github/workflows/stale-branches.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/stale-branches.yml b/.github/workflows/stale-branches.yml index 64dc0e9..7fc6353 100644 --- a/.github/workflows/stale-branches.yml +++ b/.github/workflows/stale-branches.yml @@ -12,11 +12,10 @@ jobs: runs-on: ubuntu-22.04 permissions: contents: write - issues: write pull-requests: read steps: - uses: crs-k/stale-branches@v8.2.2 with: days-before-stale: 7 - days-before-delete: 7 + days-before-delete: 14 pr-check: true From 430ce451fc568f803f4f6ac4c6cace005244bb3a Mon Sep 17 00:00:00 2001 From: VdustR Date: Wed, 11 Mar 2026 11:18:03 +0800 Subject: [PATCH 3/4] ci: revert days-before-delete to 7 (no stale notification needed) Co-Authored-By: Claude Opus 4.6 --- .github/workflows/stale-branches.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale-branches.yml b/.github/workflows/stale-branches.yml index 7fc6353..8ae9edb 100644 --- a/.github/workflows/stale-branches.yml +++ b/.github/workflows/stale-branches.yml @@ -17,5 +17,5 @@ jobs: - uses: crs-k/stale-branches@v8.2.2 with: days-before-stale: 7 - days-before-delete: 14 + days-before-delete: 7 pr-check: true From 038a51db1a798944b78bced18194c198fa0cc365 Mon Sep 17 00:00:00 2001 From: VdustR Date: Wed, 11 Mar 2026 11:21:16 +0800 Subject: [PATCH 4/4] ci: use ubuntu-latest for consistency with other workflows Co-Authored-By: Claude Opus 4.6 --- .github/workflows/stale-branches.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale-branches.yml b/.github/workflows/stale-branches.yml index 8ae9edb..7915997 100644 --- a/.github/workflows/stale-branches.yml +++ b/.github/workflows/stale-branches.yml @@ -9,7 +9,7 @@ on: jobs: stale-branches: name: Delete Stale Branches - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest permissions: contents: write pull-requests: read