semantic_release.changelog.context module

class semantic_release.changelog.context.ChangelogContext(repo_name: 'str', repo_owner: 'str', hvcs_type: 'str', history: 'ReleaseHistory', changelog_mode: "Literal['update', 'init']", prev_changelog_file: 'str', changelog_insertion_flag: 'str', filters: 'tuple[Callable[..., Any], ...]' = ())[source]

Bases: object

bind_to_environment(env: Environment) Environment[source]
changelog_insertion_flag: str
changelog_mode: Literal['update', 'init']
filters: tuple[Callable[..., Any], ...] = ()
history: ReleaseHistory
hvcs_type: str
prev_changelog_file: str
repo_name: str
repo_owner: str
class semantic_release.changelog.context.ChangelogMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

INIT = 'init'
UPDATE = 'update'
class semantic_release.changelog.context.ReleaseNotesContext(repo_name: 'str', repo_owner: 'str', hvcs_type: 'str', version: 'Version', release: 'Release', filters: 'tuple[Callable[..., Any], ...]' = ())[source]

Bases: object

bind_to_environment(env: Environment) Environment[source]
filters: tuple[Callable[..., Any], ...] = ()
hvcs_type: str
release: Release
repo_name: str
repo_owner: str
version: Version
semantic_release.changelog.context.autofit_text_width(text: str, maxwidth: int = 100, indent_size: int = 0) str[source]

Format the description text to fit within a specified width

semantic_release.changelog.context.convert_md_to_rst(md_content: str) str[source]
semantic_release.changelog.context.make_changelog_context(hvcs_client: HvcsBase, release_history: ReleaseHistory, mode: ChangelogMode, prev_changelog_file: Path, insertion_flag: str) ChangelogContext[source]
semantic_release.changelog.context.read_file(filepath: str) str[source]