mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
feat: auto-create remote branches on push (#91)
This commit is contained in:
1 parent
eccd49e877
commit
c32819fc1c
5 files changed
+173
-21
No files matched your search
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user