Skip to content

Commit

Permalink
Merge pull request #819 from pascalbreuninger/fix/ENG-2446-gerrit-url
Browse files Browse the repository at this point in the history
fix(cli): update git branch and commit regex to support non / links
  • Loading branch information
pascalbreuninger authored Nov 29, 2023
2 parents c9a081a + aaee316 commit c22b079
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 c22b079

Please sign in to comment.