Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions detection/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,19 @@ var SupportedToolsInMentions = []string{
// KnownAgentBranchPrefixes maps branch name prefixes used by AI coding CLIs/agents
// when they create their own branches (e.g. "codex/fix-bug") to tool names.
var KnownAgentBranchPrefixes = map[string]string{
"codex/": "OpenAI Codex",
"claude/": "Claude",
"copilot/": "GitHub Copilot",
"cursor/": "Cursor",
"devin/": "Devin",
"cline/": "Cline",
"aider/": "Aider",
"gemini/": "Gemini",
"codex/": "OpenAI Codex",
"claude/": "Claude",
"copilot/": "GitHub Copilot",
"cursor/": "Cursor",
"devin/": "Devin",
"cline/": "Cline",
"aider/": "Aider",
"gemini/": "Gemini",
"roo/": "Roo Code",
"roo-code/": "Roo Code",
"windsurf/": "Windsurf",
"openhands/": "OpenHands",
"swe-agent/": "SWE-Agent",
}

// KnownCoAuthorEmails Known emails present with Co-Authored-By trailers
Expand All @@ -156,6 +161,8 @@ var KnownCoAuthorEmails = map[string]string{
"cursoragent@cursor.com": "Cursor",
"noreply@aider.chat": "Aider",
"copilot@github.com": "Copilot",
"noreply@continue.dev": "Continue.dev",
"noreply@windsurf.com": "Windsurf",
}

// CoAuthorPattern Regex to look for Co-Authored-By trailer with name and email
Expand Down
16 changes: 16 additions & 0 deletions detection/trailer/trailer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,22 @@ func TestDetect(t *testing.T) {
wantScore: []float64{85},
wantConfidence: []detection.Confidence{detection.ConfidenceHigh},
},
{
name: "coauthor: Continue.dev trailer",
message: "feat: add feature\n\nCo-Authored-By: Continue <noreply@continue.dev>",
wantTools: []string{"Continue.dev"},
wantModels: []string{""},
wantScore: []float64{75},
wantConfidence: []detection.Confidence{detection.ConfidenceHigh},
},
{
name: "coauthor: Windsurf trailer",
message: "feat: add feature\n\nCo-Authored-By: Windsurf <noreply@windsurf.com>",
wantTools: []string{"Windsurf"},
wantModels: []string{""},
wantScore: []float64{75},
wantConfidence: []detection.Confidence{detection.ConfidenceHigh},
},
{
name: "coauthor: Cursor trailer with parenthesized model",
message: "refactor: extract method\n\nCo-Authored-By: Cursor (composer 2.5) <cursoragent@cursor.com>",
Expand Down