def _generate_default_changelog(self, last_tag): """ Generate changelog. Strip git log entries not matching: "bugzilla - <comment>" "- <comment>" "[[ comment ]]" @param last_tag: Last git tag. @type last_tag: str @return: The generated changelog. @rtype: str """ entry = [] generated = VersionTagger._generate_default_changelog(self, last_tag) for line in generated.split('\n'): match = re.match(BUGZILLA_REGEX, line) if match: entry.append(line) continue match = re.match(FEATURE_REGEX, line) if match: entry.append(match.group(2)) continue match = re.search(EMBEDDED_REGEX, line) if match: entry.append(match.group(2).strip()) continue return '\n'.join(entry)
def _generate_default_changelog(self, last_tag): """ Generate changelog. Strip git log entries not matching: "bugzilla - <comment>" "- <comment>" "[[ comment ]]" @param last_tag: Last git tag. @type last_tag: str @return: The generated changelog. @rtype: str """ entry = [] generated = VersionTagger._generate_default_changelog(self, last_tag) for line in generated.split('\n'): match = re.match(BUGZILLA_REGEX, line) if match: entry.append(line) continue match = re.match(FEATURE_REGEX, line) if match: entry.append(match.group(2)) continue match = re.search(EMBEDDED_REGEX, line) if match: entry.append(match.group(2).strip()) continue if len(entry) == 0: entry.append(PULP_REBUILD) return '\n'.join(entry)