Git Module Docs

Script to generate the version, changelog and releasenotes from the git repository.

autosemver.git.fit_to_cols(what, indent='', cols=79)

Wrap the given text to the columns, prepending the indent to each line.

Parameters:
  • what (str) – text to wrap.
  • indent (str) – indentation to use.
  • cols (int) – colt to wrap to.
Returns:

Wrapped text

Return type:

str

autosemver.git.fuzzy_matches_ref(fuzzy_ref, ref)
autosemver.git.fuzzy_matches_refs(fuzzy_ref, refs)
autosemver.git.get_bugs_from_commit_msg(commit_msg)
autosemver.git.get_children_per_first_parent(repo_path)
autosemver.git.get_children_per_parent(repo_path)
autosemver.git.get_commit_type(commit, children=None, tags=None, prev_version=None)
autosemver.git.get_first_parents(repo_path)
autosemver.git.get_merged_commits(repo, commit, first_parents, children_per_parent)
autosemver.git.get_refs(repo)
autosemver.git.get_repo_object(repo, object_name)
autosemver.git.get_tags(repo)
autosemver.git.get_version(commit, tags, maj_version=0, feat_version=0, fix_version=0, children=None)
autosemver.git.has_firstparent_child(sha, first_parents, parents_per_child)
autosemver.git.is_api_break(commit)
autosemver.git.is_feature(commit)
autosemver.git.pretty_commit(commit, version=None, commit_type='bug', bugtracker_url='', rpm_format=False)
autosemver.git.split_line(what, indent='', cols=79)

Split a line on the closest space, or break the last word with ‘-‘.

Parameters:
  • what (str) – text to spli one line of.
  • indent (str) – will prepend this indent to the split line, taking it into
  • in the column count. (account) –
  • cols (int) – maximum length of the split line.
Returns:

rest of the text and split line in that order.

Return type:

tuple(str, str)

Raises:
  • ValueError – when the indent is greater than the indent, or the cols
  • param is too small