import logging import re logger = logging.getLogger(__name__) class SubjectParser: """ Parses git commit subject lines to determine the type of change (breaking, feature, fix, etc...) """ # order must be aligned with associated increment_type (major...post) _CHANGE_TYPES = ["breaking", "deprecation", "feature", "fix", "documentation", "infrastructure"] _PARSE_SUBJECT_REGEX = re.compile( r""" (?:(?P