Skip to content

Commit a25afdc

Browse files
committed
lint-fixed
1 parent 81644da commit a25afdc

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

internal/engine/commit_evaluator.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ package engine
55

66
import "regexp"
77

8-
var conventionalCommitPattern = regexp.MustCompile(`^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\([A-Za-z0-9._/-]+\))?!?: .+`)
8+
const conventionalCommitTypePattern = `(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)`
9+
const conventionalCommitScopePattern = `(\([A-Za-z0-9._/-]+\))?`
10+
11+
var conventionalCommitPattern = regexp.MustCompile(
12+
`^` + conventionalCommitTypePattern + conventionalCommitScopePattern + `!?: .+`,
13+
)
914

1015
// Commit contains commit-level data that can be evaluated by policies.
1116
type Commit struct {

0 commit comments

Comments
 (0)