From 9b6ba7f919b92ef381fdef0a1fdab8362657cb3f Mon Sep 17 00:00:00 2001 From: Atila Fassina Date: Fri, 14 Feb 2025 10:14:19 +0100 Subject: [PATCH] infra: automate issue management (#1798) --- .github/workflows/close-issue.yml | 19 ++++++++++++++++++ .github/workflows/compliance.yml | 2 +- .github/workflows/issue-labelled.yml | 30 ++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/close-issue.yml create mode 100644 .github/workflows/issue-labelled.yml diff --git a/.github/workflows/close-issue.yml b/.github/workflows/close-issue.yml new file mode 100644 index 000000000..bb0960244 --- /dev/null +++ b/.github/workflows/close-issue.yml @@ -0,0 +1,19 @@ +# CronJob +name: ⏱️ Issue Close Require + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + close-issues: + if: github.repository == 'solidjs/solid-start' + runs-on: ubuntu-latest + steps: + - name: needs reproduction + uses: actions-cool/issues-helper@v3 + with: + actions: "close-issues" + token: ${{ secrets.GITHUB_TOKEN }} + labels: "needs reproduction" + inactive-day: 3 diff --git a/.github/workflows/compliance.yml b/.github/workflows/compliance.yml index 29c9cd50a..41daa25cf 100644 --- a/.github/workflows/compliance.yml +++ b/.github/workflows/compliance.yml @@ -27,4 +27,4 @@ jobs: allcontributors[bot] renovate renovate[bot] - ignore-team-members: false + ignore-team-members: true diff --git a/.github/workflows/issue-labelled.yml b/.github/workflows/issue-labelled.yml new file mode 100644 index 000000000..47f0d37e3 --- /dev/null +++ b/.github/workflows/issue-labelled.yml @@ -0,0 +1,30 @@ +name: 🔖 Issue Labelled + +on: + issues: + types: [labeled] + +jobs: + reply-labeled: + if: github.repository == 'vitejs/vite' + runs-on: ubuntu-latest + steps: + - name: contribution welcome + if: github.event.label.name == 'contribution welcome' || github.event.label.name == 'help wanted' || github.event.label.name == 'good first issue' + uses: actions-cool/issues-helper@v3 + with: + actions: "remove-labels" + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + labels: "pending triage, needs reproduction" + + - name: needs reproduction + if: github.event.label.name == 'needs reproduction' + uses: actions-cool/issues-helper@v3 + with: + actions: "create-comment, remove-labels" + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + body: | + Hello @${{ github.event.issue.user.login }}. Please provide a [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) using a GitHub repository or [StackBlitz](https://stackblitz.com/). Issues marked with `needs reproduction` will be closed if they have no activity within 3 days. + labels: "pending triage"