Skip to content

Commit

Permalink
fix: change check_jira regexp
Browse files Browse the repository at this point in the history
By default, JIra project key format must be at least 2 characters long and contain only uppercase letters.

Signed-off-by: Anton Isakov <[email protected]>
  • Loading branch information
Isakofff authored and andrewrynhard committed Feb 8, 2021
1 parent 73f334a commit 0390165
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/policy/commit/check_jira.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (j *JiraCheck) Errors() []error {
func (c Commit) ValidateJiraCheck() policy.Check {
check := &JiraCheck{}

reg := regexp.MustCompile(`.* \[?(\w+)-[1-9]{1}\d*\]?.*`)
reg := regexp.MustCompile(`.* \[?([A-Z]*)-[1-9]{1}\d*\]?.*`)

if reg.MatchString(c.msg) {
submatch := reg.FindStringSubmatch(c.msg)
Expand Down

0 comments on commit 0390165

Please sign in to comment.