From c40fa140cee4db76de06c99142f876e383434b56 Mon Sep 17 00:00:00 2001 From: Mike Alfare Date: Tue, 7 May 2024 21:04:05 -0400 Subject: [PATCH] create generic issue-bot workflow, add triaging job --- .github/workflows/issue-bot.yml | 27 +++++++++++++++++++++++++ .github/workflows/triage-labels.yml | 31 ----------------------------- 2 files changed, 27 insertions(+), 31 deletions(-) create mode 100644 .github/workflows/issue-bot.yml delete mode 100644 .github/workflows/triage-labels.yml diff --git a/.github/workflows/issue-bot.yml b/.github/workflows/issue-bot.yml new file mode 100644 index 00000000..a5116d3f --- /dev/null +++ b/.github/workflows/issue-bot.yml @@ -0,0 +1,27 @@ +# **what?** +# - respond to user comments by updating issues from `awaiting_response` to `triage` +# +# **why?** +# - automate issue triage +# +# **when?** +# - users comment on issues +name: Issue bot + +on: + issue_comment: + +permissions: + issues: write + +jobs: + triage: + name: Update triage label + if: >- + contains(github.event.issue.labels.*.name, 'awaiting_response') && + github.event == 'issue_comment' + uses: dbt-labs/actions/.github/workflows/swap-labels.yml@main + with: + add_label: triage + remove_label: awaiting_response + secrets: inherit diff --git a/.github/workflows/triage-labels.yml b/.github/workflows/triage-labels.yml deleted file mode 100644 index c693eb48..00000000 --- a/.github/workflows/triage-labels.yml +++ /dev/null @@ -1,31 +0,0 @@ -# **what?** -# When the maintenance team triages, we sometimes need more information from the issue creator. In -# those cases we remove the `triage` label and add the `awaiting_response` label. Once we -# recieve a response in the form of a comment, we want the `awaiting_response` label removed -# in favor of the `triage` label so we are aware that the issue needs action. - -# **why?** -# To help with out team triage issue tracking - -# **when?** -# This will run when a comment is added to an issue and that issue has the `awaiting_response` label. - -name: Update Triage Label - -on: issue_comment - -defaults: - run: - shell: bash - -permissions: - issues: write - -jobs: - triage_label: - if: contains(github.event.issue.labels.*.name, 'awaiting_response') - uses: dbt-labs/actions/.github/workflows/swap-labels.yml@main - with: - add_label: "triage" - remove_label: "awaiting_response" - secrets: inherit