( commitMessage: string, commitCoAuthor: WrapperCommitCoAuthor | undefined )
| 15 | const worktreeAutoCommits = new Map<string, Promise<void>>(); |
| 16 | const COMMIT_EVIDENCE_TIMEOUT_MS = 5_000; |
| 17 | |
| 18 | type CommitEvidence = { |
| 19 | commitHash: string; |
| 20 | commitMessage?: string; |
| 21 | committedAt?: string; |
| 22 | commitMessageTruncated?: true; |
| 23 | }; |
| 24 | type PushStatus = 'failed' | 'not_attempted' | 'unknown'; |
| 25 | |
| 26 | function appendCommitCoAuthor( |
| 27 | commitMessage: string, |
| 28 | commitCoAuthor: WrapperCommitCoAuthor | undefined |
| 29 | ): string { |
| 30 | if (!commitCoAuthor) return commitMessage; |
| 31 | if ( |
| 32 | /[\r\n<>]/.test(commitCoAuthor.name) || |
| 33 | /[\r\n<>]/.test(commitCoAuthor.email) || |
| 34 | commitCoAuthor.email.trim() !== commitCoAuthor.email |
| 35 | ) { |
| 36 | writeLog('auto-commit: ignoring invalid commit co-author identity'); |
no test coverage detected