idiap_devtools.gitlab.changelog¶
Utilities for retrieving, parsing and auto-generating changelogs.
Functions
|
Get the list of MRs, tags, and commits since the provided date. |
|
Retrieve a file from a Gitlab repository. |
|
Return the last release date for the given package. |
|
Parse any date supported by |
|
Write all tags of a given package to the output file. |
|
Write all tags and commits of a given package to the output file. |
- idiap_devtools.gitlab.changelog.parse_date(s)[source]¶
Parse any date supported by
dateutil.parser.parse()
.Automatically applies the “Europe/Zurich” timezone
- idiap_devtools.gitlab.changelog.get_file_from_gitlab(gitpkg, path, ref='main')[source]¶
Retrieve a file from a Gitlab repository.
- idiap_devtools.gitlab.changelog.get_last_tag_date(package)[source]¶
Return the last release date for the given package.
Falls back to the first commit date if the package has not yet been tagged
- Parameters:
package (
Project
) – The gitlab project object from where to fetch the last release date information- Return type:
- Returns:
A
datetime.datetime
object that refers to the last date the package was released. If the package was never released, then returns the date just before the first commit.- Raises:
RuntimeError – if the project has no commits.:
- idiap_devtools.gitlab.changelog.get_changes_since(gitpkg, since)[source]¶
Get the list of MRs, tags, and commits since the provided date.
- Parameters:
- Return type:
tuple
[list
[ProjectMergeRequest
],list
[ProjectTag
],list
[ProjectCommit
]]- Returns:
A list of merge requests, tags and commits for the given package, since the determined date.