Skip to content

Commit

Permalink
fix: follow git branch naming convention based on docs.github.com (#1037
Browse files Browse the repository at this point in the history
)

Signed-off-by: Mehant Kammakomati <[email protected]>
Co-authored-by: Mehant Kammakomati <[email protected]>
  • Loading branch information
kmehant and kmehant authored May 29, 2023
1 parent c302661 commit f809f33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/vcs/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func isGitCommitHash(commithash string) bool {
}

func isGitBranch(branch string) bool {
gitBranchRegex := regexp.MustCompile(`^(main|development|master|(features|tests|(bug|hot)fix)((\/|-)[a-zA-Z0-9]+([-_][a-zA-Z0-9]+)*){1,2}|release(\/|-)[0-9]+(\.[0-9]+)*(-(alpha|beta|rc)[0-9]*)?)$`)
gitBranchRegex := regexp.MustCompile(`^[a-zA-Z][a-zA-Z0-9\.\-_\/]*$`)
return gitBranchRegex.MatchString(branch)
}

Expand Down

0 comments on commit f809f33

Please sign in to comment.