Make Claude Code footer stripping more robust #25

Merged
probablycorey merged 1 commits from probablycorey/fix-claude-footer-strip into main 2026-03-11 21:06:51 +00:00

View File

@ -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}>)