API Docs
Script to generate the version, changelog and releasenotes from the git
repository.
-
autosemver.api.get_authors(*args, **kwargs)[source]
Given a repo and optionally a base revision to start from, will return
the list of authors.
| Parameters: |
- repo_path (str) – Path to the code git repository.
- from_commit (str) – Refspec of the commit to start aggregating the
authors from.
|
| Returns: | lexicographically sorted list of authors of the repo.
|
| Return type: | list
|
-
autosemver.api.get_changelog(*args, **kwargs)[source]
Given a repo path and an option commit/tag/refspec to start from, will
get the rpm compatible changelog
| Parameters: |
- repo_path (str) – path to the git repo
- from_commit (str) – refspec (partial commit hash, tag, branch, full
refspec, partial refspec) to start the changelog from
- rpm_format (bool) – if set, the changelog will be suitable to be uses as
rpm package changelog.
|
| Returns: | Rpm compatible changelog
|
| Return type: | str
|
-
autosemver.api.get_current_version(*args, **kwargs)[source]
Given a repo will return the version string, according to semantic
versioning, counting as non-backwards compatible commit any one with a
message header that matches (case insensitive):
And as features any commit with a header matching:
And counting any other as a bugfix
| Parameters: | repo_path (str) – path to the git repository to get the version for. |
| Returns: | Version string for that repository. |
| Return type: | str |
-
autosemver.api.get_releasenotes(*args, **kwargs)[source]
Given a repo and optionally a base revision to start from, will return
a text suitable for the relase notes announcement, grouping the bugs, the
features and the api-breaking changes.
| Parameters: |
- repo_path (str) – Path to the code git repository.
- from_commit (str) – Refspec of the commit to start aggregating the
authors from.
- bugtracker_url (str) – URL to be prepended to any bug ids found in the
commits.
|
| Returns: | Release notes text.
|
| Return type: | str
|
-
autosemver.api.tag_versions(*args, **kwargs)[source]
Given a repo will add a tag for each major version.
| Parameters: | repo_path (str) – path to the git repository to tag. |