Skip to content

Commit

Permalink
fix(cli): update git branch and commit regex to support non / links
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalbreuninger committed Nov 27, 2023
1 parent c9a081a commit aaee316
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 + `)$`)
)
Expand Down

0 comments on commit aaee316

Please sign in to comment.