feat: adapt pullfrog for gitea + ollama

This commit is contained in:
2026-05-31 01:01:00 -05:00
parent 36ac64a5b6
commit 2aca1a3aa3
183 changed files with 1419 additions and 28292 deletions
+17
View File
@@ -0,0 +1,17 @@
const FOOTER_MARKER = "<!-- shockbot-footer -->";
export function buildShockbotFooter(params?: {
model?: string | undefined;
}): string {
const modelPart = params?.model ? ` · \`${params.model}\`` : "";
return `\n\n<br>\n\n---\n${FOOTER_MARKER}\n*Reviewed by [shockbot](https://git.shockvpn.com)${modelPart}*`;
}
export function stripExistingFooter(body: string): string {
const markerIdx = body.lastIndexOf(FOOTER_MARKER);
if (markerIdx === -1) return body;
// walk back past "\n\n---\n" before the marker
const beforeMarker = body.slice(0, markerIdx);
const stripped = beforeMarker.replace(/\s*\n+---\n$/, "").trimEnd();
return stripped;
}