Skip to content

Commit 1bf22e4

Browse files
[CI] Update issue comment triage workflow file
1 parent ec6ea3a commit 1bf22e4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/issue-comment-triage.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ jobs:
1010
issue_comment_triage:
1111
runs-on: ubuntu-latest
1212
env:
13+
# issue_comment events are triggered by comments on issues and pull requests. Checking the
14+
# value of github.event.issue.pull_request tells us whether the issue is an issue or is
15+
# actually a pull request, allowing us to dynamically set the gh subcommand:
16+
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issue_comment-on-issues-only-or-pull-requests-only
17+
COMMAND: ${{ github.event.issue.pull_request && 'pr' || 'issue' }}
1318
GH_TOKEN: ${{ github.token }}
1419
steps:
15-
- name: 'Remove stale and waiting-response on comment'
16-
run: gh issue edit ${{ github.event.issue.html_url }} --remove-label stale,waiting-response
20+
- name: 'Remove waiting-response on comment'
21+
run: gh ${{ env.COMMAND }} edit ${{ github.event.issue.html_url }} --remove-label waiting-response

0 commit comments

Comments
 (0)