From 945d8391a6e4f1589e455e505fe1b3d5db7ccaf8 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:17 -0400 Subject: [PATCH] [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 0f2af3d0..00017cdf 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