feat: auto-create remote branches on push (#91)

This commit is contained in:
theepicsaxguy authored and GitHub committed 2026-01-31 12:06:07 -05:00
1 parent eccd49e877
commit c32819fc1c
5 files changed
+173 -21

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
export function isNoUpstreamError(error: Error): boolean {
const patterns = [
/The current branch .+ has no upstream branch/i,
/no upstream configured for branch/i,
/no upstream branch/i,
]
return patterns.some(pattern => pattern.test(error.message))
}
export function parseBranchNameFromError(error: Error): string | null {
const match = error.message.match(/The current branch (.+) has no upstream branch/i)
return match ? match[1].trim() : null
}