fix: restrict parseTodoTransition regex to only capture valid status words

This commit is contained in:
Tiara Rodney 2026-03-20 20:45:57 +01:00
parent 326c86307a
commit f95f51ed22
No known key found for this signature in database
GPG key ID: 5CD8EC1D46106723

View file

@ -89,7 +89,7 @@ function parseGitLog(range: string, cwd: string): GitCommit[] {
// Check if a commit subject is a todo transition
export function parseTodoTransition(subject: string): { issueId: number; status: string } | null {
const match = subject.match(/^todo\((\d+)\):\s*(\S+)/)
const match = subject.match(/^todo\((\d+)\):\s*([a-z-]+)/)
if (!match) return null
return { issueId: Number(match[1]), status: match[2] }
}