From 5b1521d102b1a27e79963166a9375a8f5717b779 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Fri, 18 Aug 2023 19:10:37 -0400 Subject: [PATCH] generalize handling --- .github/workflows/issue-handler.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/issue-handler.yml b/.github/workflows/issue-handler.yml index 80fca7f3..8cf45c1f 100644 --- a/.github/workflows/issue-handler.yml +++ b/.github/workflows/issue-handler.yml @@ -1,7 +1,7 @@ # cleans up our issues based on tags applied name: issue -run-name: "closing: ${{ github.event.issue.title }}" +run-name: "handling #${{ github.event.issue.number }}: ${{ github.event.issue.title }}" on: issues: @@ -12,18 +12,22 @@ jobs: permissions: issues: write runs-on: ubuntu-latest - if: github.event.label.name == 'old-version' || github.event.label.name == 'gha-issue' steps: - name: Close reason id: close-reason run: | - if test "${{ github.event.label.name }}" = "old-version"; then + case "${{ github.event.label.name }}" in + "old-version") echo "reason=not_planned" >>$GITHUB_OUTPUT - else + ;; + "gha-issue") + "404") echo "reason=completed" >>$GITHUB_OUTPUT - fi + ;; + esac - name: Close issue uses: actions-cool/issues-helper@v3 + if: steps.close-reason.outputs.reason != '' with: actions: close-issue token: ${{ github.token }}