File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66from commitizen import factory , out , git , cz
77from commitizen .config import BaseConfig
8- from commitizen .error_codes import NO_COMMITS_FOUND
8+ from commitizen .error_codes import NO_COMMITS_FOUND , NO_PATTERN_MAP
99
1010try :
1111 import importlib .resources as pkg_resources
@@ -32,11 +32,13 @@ def __call__(self):
3232 out .error (
3333 f"'{ self .config .settings ['name' ]} ' rule does not support changelog"
3434 )
35+ raise SystemExit (NO_PATTERN_MAP )
3536
3637 pat = re .compile (changelog_pattern )
3738
3839 commits = git .get_commits (start = self .start_rev )
3940 if not commits :
41+ out .error ("No commits found" )
4042 raise SystemExit (NO_COMMITS_FOUND )
4143
4244 tag_map = {tag .rev : tag .name for tag in git .get_tags ()}
Original file line number Diff line number Diff line change 99class BaseCommitizen (metaclass = ABCMeta ):
1010 bump_pattern : Optional [str ] = None
1111 bump_map : Optional [dict ] = None
12+ changelog_pattern : Optional [str ] = None
13+ changelog_map : Optional [dict ] = None
1214 default_style_config : List [Tuple [str , str ]] = [
1315 ("qmark" , "fg:#ff9d00 bold" ),
1416 ("question" , "bold" ),
You can’t perform that action at this time.
0 commit comments