@@ -781,7 +781,7 @@ def check_commit_msg(message, files):
781
781
return 1
782
782
783
783
return 0
784
- jira_id_pattern = re .compile (r'\b[A-Z]{2,5 }-[0-9]{1,4 }\b' )
784
+ jira_id_pattern = re .compile (r'\b[A-Z]{2,8 }-[0-9]{1,5 }\b' )
785
785
786
786
787
787
class TestJiraIDPattern (unittest .TestCase ):
@@ -790,15 +790,20 @@ def _test(input, is_jira=True):
790
790
m = jira_id_pattern .search (input )
791
791
self .assertEqual (bool (m ), is_jira )
792
792
_test ('BLD-5704' )
793
+ _test ('CQ-1' )
794
+ _test ('CQ-12345' )
795
+ _test ('SKETCHER-1' )
796
+ _test ('SKETCHER-12345' )
793
797
_test ("BLD-1234 fixed some builds" )
794
798
_test ("fixed some builds BLD-1234 " )
795
799
_test ("fixed some builds (Jira BLD-1234)" )
796
800
_test ("fixed some builds\n some more text BLD-1234" )
797
801
_test ('lower-1234' , False )
798
802
_test ('A-1234' , False )
799
- _test ('ABCDEF-1234' , False )
800
- _test ('BLD-12345' , False )
801
- _test ('wordBLD-1234word' , False )
803
+ _test ('ABCDEFGHI-1234' , False )
804
+ _test ('BLD-123456' , False )
805
+ _test ('wordBLD-1234' , False )
806
+ _test ('BLD-1234word' , False )
802
807
803
808
804
809
def commit_hook (merge = False ):
0 commit comments