File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1414
1515def main ():
1616
17- cmd = "git log --pretty=format:'%s' master..HEAD"
17+ cmd_tag = "git describe --abbrev=0"
18+ tag = subprocess .check_output (cmd_tag ,
19+ shell = True ).decode ("utf-8" ).split ('\n ' )[0 ]
20+
21+ cmd = "git log --pretty=format:'%s' {}..master" .format (tag )
1822 commits = subprocess .check_output (cmd , shell = True )
1923 commits = commits .decode ("utf-8" ).split ('\n ' )
2024 for commit in commits :
2125
22- pattern = r'((build|ci|docs|feat|fix|perf|refactor|style|test|chore|revert)(\([\w\-]+\))?:\s.*)|((Merge)(\([\w\-]+\))?\s.*)' # noqa
26+ pattern = r'((build|ci|docs|feat|fix|perf|refactor|style|test|chore|revert)(\([\w\-]+\))?:\s.*)|((Merge|Fixed )(\([\w\-]+\))?\s.*)' # noqa
2327 m = re .match (pattern , commit )
2428 if m is None :
2529 print ("\n Error with git message '{}' style" .format (commit ))
You can’t perform that action at this time.
0 commit comments