From aaee316a364a365fb9bdb2bd74dbd252c7ca1aaf Mon Sep 17 00:00:00 2001 From: Pascal Breuninger Date: Mon, 27 Nov 2023 09:27:00 +0100 Subject: [PATCH] fix(cli): update git branch and commit regex to support non / links --- pkg/git/git.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/git/git.go b/pkg/git/git.go index 1b23582c1..fa076f16e 100644 --- a/pkg/git/git.go +++ b/pkg/git/git.go @@ -17,7 +17,7 @@ const ( ) var ( - branchRegEx = regexp.MustCompile(`^([^@]*(?:git@)?[^@/]+/[^@/]+/[^@/]+)@([a-zA-Z0-9\./\-\_]+)$`) + branchRegEx = regexp.MustCompile(`^([^@]*(?:git@)?[^@/]+/[^@/]+/?[^@/]+)@([a-zA-Z0-9\./\-\_]+)$`) commitRegEx = regexp.MustCompile(`^([^@]*(?:git@)?[^@/]+/[^@]+)` + regexp.QuoteMeta(CommitDelimiter) + `([a-zA-Z0-9]+)$`) prReferenceRegEx = regexp.MustCompile(`^([^@]*(?:git@)?[^@/]+/[^@]+)@(` + PullRequestReference + `)$`) )