class documentation

class ChangelogEntryFormatter(object):

View In Hierarchy

Helper class for generating changelog entries from git commits

Class Method compose Generate a changelog entry from a git commit.
Class Variable bts_meta_tags Undocumented
Class Variable bug_id_re Undocumented
Class Variable max_entry_line_length Undocumented
Class Method _extra_filter Filter out specific lines from the commit message.
Class Method _parse_bts_tags Parse and filter out bug tracking system related meta tags from commit message.
@classmethod
def compose(cls, commit_info, **kwargs):

Generate a changelog entry from a git commit.

Parameters
commit_info:commit_info object from gbp.git.repository.GitRepository.get_commit_info().info about the commit
**kwargs:dictadditional arguments to the compose() method, currently we recognize 'full', 'id_len' and 'ignore_re'
Returns
list of strformatted changelog entry
bts_meta_tags: tuple[str, ...] =

Undocumented

bug_id_re: str =

Undocumented

max_entry_line_length: int =

Undocumented

@classmethod
def _extra_filter(cls, lines, ignore_re):

Filter out specific lines from the commit message.

Parameters
lines:list of strcommit message
ignore_re:strregexp for matching ignored lines
Returns
list of strfiltered commit message
@classmethod
def _parse_bts_tags(cls, lines, meta_tags):

Parse and filter out bug tracking system related meta tags from commit message.

Parameters
lines:list of strcommit message
meta_tags:tuple of strmeta tags to look for
Returns
(dict, list of str)bts-ids per meta tag and the non-mathced lines