From 608a0c2d63ef108f58409d4ea69631cf2390aa3a Mon Sep 17 00:00:00 2001 From: Service Account - Terraform Provider DevEx <100357958+hc-github-team-tf-provider-devex@users.noreply.github.com> Date: Fri, 17 May 2024 15:09:54 -0400 Subject: [PATCH 1/4] [CI] Update issue comment triage workflow file --- .github/workflows/issue-comment-triage.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/issue-comment-triage.yml diff --git a/.github/workflows/issue-comment-triage.yml b/.github/workflows/issue-comment-triage.yml new file mode 100644 index 0000000..6c1ddcc --- /dev/null +++ b/.github/workflows/issue-comment-triage.yml @@ -0,0 +1,14 @@ +# DO NOT EDIT - This GitHub Workflow is managed by automation +# https://github.com/hashicorp/terraform-devex-repos +name: Issue Comment Triage + +on: + issue_comment: + types: [created] + +jobs: + issue_comment_triage: + runs-on: ubuntu-latest + steps: + - name: 'Remove stale and waiting-response on comment' + run: gh issue edit ${{ github.event.issue.number }} --remove-label stale,waiting-response From e08428bc1b03a4549b7aaf8f2d44ffc1bd2e6d4e Mon Sep 17 00:00:00 2001 From: Service Account - Terraform Provider DevEx <100357958+hc-github-team-tf-provider-devex@users.noreply.github.com> Date: Fri, 17 May 2024 15:23:07 -0400 Subject: [PATCH 2/4] [CI] Update issue comment triage workflow file --- .github/workflows/issue-comment-triage.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/issue-comment-triage.yml b/.github/workflows/issue-comment-triage.yml index 6c1ddcc..556d36d 100644 --- a/.github/workflows/issue-comment-triage.yml +++ b/.github/workflows/issue-comment-triage.yml @@ -9,6 +9,8 @@ on: jobs: issue_comment_triage: runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ github.token }} steps: - name: 'Remove stale and waiting-response on comment' run: gh issue edit ${{ github.event.issue.number }} --remove-label stale,waiting-response From 21093d5e3100ec256d9d392d2d5a0ceadfdfd68f Mon Sep 17 00:00:00 2001 From: Service Account - Terraform Provider DevEx <100357958+hc-github-team-tf-provider-devex@users.noreply.github.com> Date: Fri, 17 May 2024 15:48:17 -0400 Subject: [PATCH 3/4] [CI] Update issue comment triage workflow file --- .github/workflows/issue-comment-triage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issue-comment-triage.yml b/.github/workflows/issue-comment-triage.yml index 556d36d..0f2af3d 100644 --- a/.github/workflows/issue-comment-triage.yml +++ b/.github/workflows/issue-comment-triage.yml @@ -13,4 +13,4 @@ jobs: GH_TOKEN: ${{ github.token }} steps: - name: 'Remove stale and waiting-response on comment' - run: gh issue edit ${{ github.event.issue.number }} --remove-label stale,waiting-response + run: gh issue edit ${{ github.event.issue.html_url }} --remove-label stale,waiting-response From fa933962d0efbe0dd57ac844e52cdb97ff655f84 Mon Sep 17 00:00:00 2001 From: Service Account - Terraform Provider DevEx <100357958+hc-github-team-tf-provider-devex@users.noreply.github.com> Date: Fri, 17 May 2024 16:11:09 -0400 Subject: [PATCH 4/4] [CI] Update issue comment triage workflow file --- .github/workflows/issue-comment-triage.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/issue-comment-triage.yml b/.github/workflows/issue-comment-triage.yml index 0f2af3d..00017cd 100644 --- a/.github/workflows/issue-comment-triage.yml +++ b/.github/workflows/issue-comment-triage.yml @@ -10,7 +10,12 @@ jobs: issue_comment_triage: runs-on: ubuntu-latest env: + # issue_comment events are triggered by comments on issues and pull requests. Checking the + # value of github.event.issue.pull_request tells us whether the issue is an issue or is + # actually a pull request, allowing us to dynamically set the gh subcommand: + # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issue_comment-on-issues-only-or-pull-requests-only + COMMAND: ${{ github.event.issue.pull_request && 'pr' || 'issue' }} GH_TOKEN: ${{ github.token }} steps: - - name: 'Remove stale and waiting-response on comment' - run: gh issue edit ${{ github.event.issue.html_url }} --remove-label stale,waiting-response + - name: 'Remove waiting-response on comment' + run: gh ${{ env.COMMAND }} edit ${{ github.event.issue.html_url }} --remove-label waiting-response