Skip to content

Commit e6ecd80

Browse files
Add author_association and PR-only guards to assist job
- Restrict @claude to trusted authors (author_association != NONE) - Only trigger on PR comments, not regular issues (check github.event.issue.pull_request) Co-authored-by: Isaac
1 parent c6576dd commit e6ecd80

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/claude-code.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ jobs:
5151
env:
5252
GH_TOKEN: ${{ steps.token.outputs.token }}
5353

54-
# Interactive @claude mentions.
54+
# Interactive @claude mentions (PRs only, trusted authors only).
5555
assist:
5656
if: |
5757
github.event.comment.user.type != 'Bot' &&
58+
github.event.comment.author_association != 'NONE' &&
5859
(
59-
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
60+
(github.event_name == 'issue_comment' && github.event.issue.pull_request && contains(github.event.comment.body, '@claude')) ||
6061
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude'))
6162
)
6263
runs-on:

0 commit comments

Comments
 (0)