MCPcopy Create free account
hub / github.com/Cambricon/mlu-ops / get_commit_msg

Function get_commit_msg

tools/commitlint.py:68–73  ·  view source on GitHub ↗
(msg)

Source from the content-addressed store, hash-verified

66
67# get header
68def get_commit_msg(msg):
69 res = re.search("\n", msg)
70 if(res == None):
71 return msg
72 else:
73 return msg[0:res.span()[0]]
74
75def valid_commit_msg(commit_msg, scopes):
76 res1 = re.match(r'(?P<type>\[\w+\])(?P<scope>\(\w+\))(?P<colon>:)(?P<subject> *\w+)', commit_msg)

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected