fix: allow string values for commit_footer config (#919)

This commit is contained in:
YeonGyu-Kim
2026-02-07 19:04:34 +09:00
parent 8e92704316
commit e4bbd6bf15
4 changed files with 117 additions and 7 deletions
@@ -97,9 +97,10 @@ export function injectGitMasterConfig(template: string, config?: GitMasterConfig
sections.push(``)
if (commitFooter) {
const footerText = typeof commitFooter === "string" ? commitFooter : "Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)"
sections.push(`1. **Footer in commit body:**`)
sections.push("```")
sections.push(`Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)`)
sections.push(footerText)
sections.push("```")
sections.push(``)
}
@@ -113,14 +114,16 @@ export function injectGitMasterConfig(template: string, config?: GitMasterConfig
}
if (commitFooter && includeCoAuthoredBy) {
const footerText = typeof commitFooter === "string" ? commitFooter : "Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)"
sections.push(`**Example (both enabled):**`)
sections.push("```bash")
sections.push(`git commit -m "{Commit Message}" -m "Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)" -m "Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>"`)
sections.push(`git commit -m "{Commit Message}" -m "${footerText}" -m "Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>"`)
sections.push("```")
} else if (commitFooter) {
const footerText = typeof commitFooter === "string" ? commitFooter : "Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)"
sections.push(`**Example:**`)
sections.push("```bash")
sections.push(`git commit -m "{Commit Message}" -m "Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)"`)
sections.push(`git commit -m "{Commit Message}" -m "${footerText}"`)
sections.push("```")
} else if (includeCoAuthoredBy) {
sections.push(`**Example:**`)