Remove Claude Code footer from Discord PR messages
Some checks failed
CI / test (pull_request) Has been cancelled

Strip the "🤖 Generated with Claude Code" line from PR bodies before posting them to Discord. This line is added by Claude Code when creating PRs but is unnecessary in the Discord bridge.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Corey Johnson 2026-03-10 11:44:05 -07:00
parent a37dc8b503
commit 28cc3d4c94

View File

@ -112,7 +112,9 @@ class PRHandler {
}
static formatPrBody(pullRequest: Gitea.PullRequest, repositoryFullName: string): string {
const body = pullRequest.body || "_empty_"
const body = (pullRequest.body || "_empty_")
.replace(/\n*🤖 Generated with \[Claude Code\].*$/s, "")
.trim() || "_empty_"
let message = `
> ### [${pullRequest.title}](<${pullRequest.html_url}>)
> **${repositoryFullName}**