diff --git a/.changeset/eight-pears-grow.md b/.changeset/eight-pears-grow.md new file mode 100644 index 000000000..15a1c31a1 --- /dev/null +++ b/.changeset/eight-pears-grow.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Add stale workflow diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 000000000..099396a1b --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,25 @@ +# This workflow will only label and/or close 30 issues at a time in order to avoid exceeding a rate limit. +# More info: https://docs.github.com/en/actions/use-cases-and-examples/project-management/closing-inactive-issues +name: Close inactive issues +on: + schedule: + - cron: "30 1 * * *" + +jobs: + close-issues: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@28ca103 + with: + days-before-issue-stale: 60 + days-before-issue-close: 14 + stale-issue-label: "stale" + stale-issue-message: "This issue is stale because it has been open for 60 days with no activity." + close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale." + days-before-pr-stale: -1 + days-before-pr-close: -1 + exempt-issue-labels: "pinned,security" + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test-stale.yml b/.github/workflows/test-stale.yml new file mode 100644 index 000000000..be5737858 --- /dev/null +++ b/.github/workflows/test-stale.yml @@ -0,0 +1,32 @@ +name: Test Stale Issues Workflow +on: + workflow_dispatch: + inputs: + days-before-stale: + description: "Days before an issue becomes stale" + required: true + default: "1" + days-before-close: + description: "Days before a stale issue is closed" + required: true + default: "1" + +jobs: + test-stale: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@28ca103 + with: + days-before-issue-stale: ${{ github.event.inputs.days-before-stale }} + days-before-issue-close: ${{ github.event.inputs.days-before-close }} + stale-issue-label: "stale" + stale-issue-message: "This issue is stale because it has been open for ${{ github.event.inputs.days-before-stale }} days with no activity." + close-issue-message: "This issue was closed because it has been inactive for ${{ github.event.inputs.days-before-close }} days since being marked as stale." + days-before-pr-stale: -1 + days-before-pr-close: -1 + exempt-issue-labels: "pinned,security" + repo-token: ${{ secrets.GITHUB_TOKEN }} + debug-only: true