From 07a4af149af226e374b6cd9847272b9096232aed Mon Sep 17 00:00:00 2001 From: tester Date: Mon, 14 Sep 2026 20:41:50 +0800 Subject: [PATCH] ci(claude): let a rewritten comment drive the reconcile round MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mega-putin answers review feedback by posting ":mag: Looking into this..." the moment it picks the work up and rewriting that same comment into the real answer minutes later. Subscribed to `created` only, the review round landed on the placeholder and the answer — an `edited` event nobody listened for — was never seen, leaving the question open with its answer directly above it (megaeth-labs/mega-agents#317). - `issue_comment: [created, edited]`, so the rewrite drives the round. - `pr-review` declines comments carrying `claude-review:skip`, the marker mega-putin puts on a placeholder it intends to rewrite. The shared action enforces this too (megaeth-labs/.github#46); the `if` declines one step earlier, before a runner starts. - `interactive` pins `github.event.action == 'created'` so editing an old comment that mentions @claude cannot re-run a session. The mega-maxwell[bot] exclusion already here is what keeps the sticky status comment — rewritten in place every round — from retriggering. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01DMw1H8WTihb5CfQ7tabxdt --- .github/workflows/claude.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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: