Skip to content

Commit 4c7a7dd

Browse files
phpstan-botclaude
authored andcommitted
Trigger react-on-comment workflow on issues opened and fall back to issue body
Add `issues: types: [opened]` trigger so the workflow reacts when new issues are opened with the trigger phrase. Also add `github.event.issue.body` as a fallback in COMMENT_BODY so the issue description is checked when no comment or review body is available. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 591a1a6 commit 4c7a7dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/claude-react-on-comment.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: "Claude React on comment"
22

33
on:
4+
issues:
5+
types: [opened]
46
issue_comment:
57
types: [created]
68
pull_request_review:
@@ -29,7 +31,7 @@ jobs:
2931
- name: "Check for trigger phrase"
3032
id: check
3133
env:
32-
COMMENT_BODY: ${{ github.event.comment.body || github.event.review.body || '' }}
34+
COMMENT_BODY: ${{ github.event.comment.body || github.event.review.body || github.event.issue.body || '' }}
3335
run: |
3436
if echo "$COMMENT_BODY" | grep -qF "@phpstan-bot"; then
3537
echo "triggered=true" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)