qgispluginci.changelog module¶
Changelog parser. Following <https://keepachangelog.com/en/1.0.0/>.
- class qgispluginci.changelog.ChangelogParser(parent_folder: Path | str = PosixPath('.'), changelog_path: str = 'CHANGELOG.md')¶
Bases:
object
- content(tag: str) str | None ¶
Get a version content to add in a release according to the version name.
- classmethod has_changelog(parent_folder: Path | str = PosixPath('.'), changelog_path='CHANGELOG.md') bool ¶
Check if a changelog file exists within the parent folder. If it does, it returns True and the file path is stored as class attribute. If not, it returns False and the class attribute is reset to None.
- Args:
parent_folder (Union[Path, str], optional): parent folder where to look for a CHANGELOG.md file. Defaults to Path(“.”).
changelog_path str: Path relative to parent_folder. Defaults to CHANGELOG.md.
- Raises:
FileExistsError: if the parent_folder path doesn’t exist TypeError: if the path is not a folder but a path
- Returns:
bool: True if a CHANGELOG.md exists within the parent_folder