Update branch name
Change-Id: I7c14cdcf3bbbf6dfa08f6ac08f74db8679365f92
diff --git a/server/git/webhook.go b/server/git/webhook.go
index 285ea28..6ab18a1 100644
--- a/server/git/webhook.go
+++ b/server/git/webhook.go
@@ -283,12 +283,12 @@
// ExtractTaskID extracts task ID from branch name like "solution/[task-id]-title" or "subtasks/[task-id]-title"
func ExtractTaskID(branchName string) (string, error) {
- // Match patterns like "solution/[task-123]-title", "subtasks/[task-456]-description", etc.
- re := regexp.MustCompile(`^(?:solution|subtasks)/\[([^\]]+)\]-.+$`)
+ // Match patterns like "solution/(task-123)-title", "subtasks/(task-456)-description", etc.
+ re := regexp.MustCompile(`^(?:solution|subtasks)/\(([^)]+)\)-.+$`)
matches := re.FindStringSubmatch(branchName)
if len(matches) != 2 {
- return "", fmt.Errorf("branch name '%s' does not match expected pattern (solution/[task-id]-title or subtasks/[task-id]-title)", branchName)
+ return "", fmt.Errorf("branch name '%s' does not match expected pattern (solution/(task-id)-title or subtasks/(task-id)-title)", branchName)
}
return matches[1], nil