devops.files.update_changelog
Module for updating the changelog file.
Functions
Return the GitHub URL of the current repository. |
|
|
Update the changelog file with a new version entry. |
Exceptions
|
Base class for changelog related errors. |
- exception devops.files.update_changelog.DevOpsChangelogError(message)[source]
Bases:
ExceptionBase class for changelog related errors.
- Parameters:
message (str)
- Return type:
None
- devops.files.update_changelog.get_repo_url()[source]
Return the GitHub URL of the current repository.
Uses
GITHUB_REPOSITORY(andGITHUB_SERVER_URL) when set, as in GitHub Actions, and theoriginremote otherwise.- Returns:
str – The repository URL, for example
https://github.com/MolarVerse/devops.- Raises:
DevOpsChangelogError – If the repository cannot be determined.
- Return type:
- devops.files.update_changelog.update_changelog(version, changelog_path, repo_url=None)[source]
Update the changelog file with a new version entry.
- Parameters:
version (str) – The new version to add to the changelog.
changelog_path (Path) – The path to the changelog file.
repo_url (str | None) – The GitHub URL used for the release link. Defaults to
get_repo_url().
- Raises:
DevOpsFileNotFoundError – If the changelog file does not exist. Happens inside open_file.
DevOpsChangelogError – If the “## Next Release” marker is not found in the changelog or the repository URL cannot be determined.
- Return type:
None