From c22c5c423c8ed99a44055da04b30d588bc61a691 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Wed, 11 Mar 2026 13:18:24 -0700 Subject: [PATCH] Make Claude Code footer stripping more robust Updated the regex to match the robot emoji followed by "Claude Code" on the last line, regardless of formatting. Also pulled the regex into a named variable with a comment to clarify intent. This catches variations like "Generated with Claude Code" without square brackets. Co-Authored-By: Claude Haiku 4.5 --- packages/spike/src/bridge/webhook-handler.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/spike/src/bridge/webhook-handler.ts b/packages/spike/src/bridge/webhook-handler.ts index be0d904..3c28758 100644 --- a/packages/spike/src/bridge/webhook-handler.ts +++ b/packages/spike/src/bridge/webhook-handler.ts @@ -112,8 +112,10 @@ class PRHandler { } static formatPrBody(pullRequest: Gitea.PullRequest, repositoryFullName: string): string { + // Strip the "🤖 Generated with Claude Code" footer that gets appended to PR bodies + const claudeFooter = /\n*🤖.*Claude Code[^\n]*$/ const body = (pullRequest.body || "_empty_") - .replace(/\n*🤖 Generated with \[Claude Code\].*$/s, "") + .replace(claudeFooter, "") .trim() || "_empty_" let message = ` > ### [${pullRequest.title}](<${pullRequest.html_url}>)