diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index 596252ff..95bfb2e9 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -1,7 +1,12 @@ name: Claude Code on: issue_comment: - types: [created] + # `edited` matters as much as `created`: mega-putin acks feedback with a + # placeholder the moment it picks the work up and rewrites that same + # comment into the real answer minutes later, so the answer only ever + # arrives as an edit. Jobs that must not re-fire on an edit pin + # `github.event.action == 'created'` themselves. + types: [created, edited] pull_request_review_comment: types: [created] pull_request_review: @@ -15,6 +20,7 @@ jobs: interactive: if: | (github.event_name == 'issue_comment' && + github.event.action == 'created' && contains(github.event.comment.body, '@claude') && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'COLLABORATOR' || @@ -64,7 +70,8 @@ jobs: github.event.action == 'reopened')) || (github.event_name == 'issue_comment' && github.event.issue.pull_request != null && - github.event.comment.user.login != 'mega-maxwell[bot]') + github.event.comment.user.login != 'mega-maxwell[bot]' && + !contains(github.event.comment.body, 'claude-review:skip')) runs-on: ubuntu-24.04 timeout-minutes: 30 permissions: