From cb9996ca6245139e9f78d1f56c2e2bb0876312be Mon Sep 17 00:00:00 2001 From: Ben McMorran Date: Fri, 7 Jan 2022 16:05:42 -0800 Subject: [PATCH] Update issue automation --- .github/workflows/remove-labels.yml | 15 +++++++++++++++ .github/workflows/stale-issues.yml | 28 ++++++++++++++++------------ .github/workflows/triage-issues.yml | 16 ++++++++++++++++ 3 files changed, 47 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/remove-labels.yml create mode 100644 .github/workflows/triage-issues.yml diff --git a/.github/workflows/remove-labels.yml b/.github/workflows/remove-labels.yml new file mode 100644 index 00000000..a98d5247 --- /dev/null +++ b/.github/workflows/remove-labels.yml @@ -0,0 +1,15 @@ +name: Remove labels from closed issues + +on: + issues: + types: + - closed + +jobs: + label_issues: + runs-on: ubuntu-latest + steps: + - name: Remove labels + uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90 + with: + remove-labels: triage, needs-more-info diff --git a/.github/workflows/stale-issues.yml b/.github/workflows/stale-issues.yml index 10c0b252..f4baee2e 100644 --- a/.github/workflows/stale-issues.yml +++ b/.github/workflows/stale-issues.yml @@ -1,22 +1,26 @@ -name: Mark stale issues and close them +name: Label and close stale issues on: schedule: - cron: "0 * * * *" + workflow_dispatch: jobs: stale: - runs-on: ubuntu-latest - steps: - - uses: blackchoey/stale@releases/v1.2 + - uses: actions/stale@v4.1.0 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: 'This issue has been automatically marked as stale because it has no recent activities. It will be closed if no further activity occurs within 3 days. Thank you for your contributions.' - stale-issue-label: 'stale' - days-before-stale: 7 - only-labels: 'needs more info' - last-updated-user-type: 'collaborator' - days-before-close: 3 - operations-per-run: 150 + days-before-stale: 30 + days-before-close: 7 + stale-issue-message: >- + This issue has been automatically marked as stale because it has been + inactive for 30 days. To reactivate the issue, simply post a comment + with the requested information to help us diagnose this issue. If this + issue remains inactive for another 7 days, it will be automatically + closed. + close-issue-message: >- + This issue has been automatically closed due to inactivity. If you are + still experiencing problems, please open a new issue. + stale-issue-label: stale + only-labels: needs-more-info diff --git a/.github/workflows/triage-issues.yml b/.github/workflows/triage-issues.yml new file mode 100644 index 00000000..b5809a7c --- /dev/null +++ b/.github/workflows/triage-issues.yml @@ -0,0 +1,16 @@ +name: Label new issues + +on: + issues: + types: + - opened + - reopened + +jobs: + label_issues: + runs-on: ubuntu-latest + steps: + - name: Add triage label + uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90 + with: + add-labels: triage