Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# 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', mask_initial_release: 'bool', filters: 'tuple[Callable[..., Any], ...]' = ())

  Bases: `object`

  bind_to_environment(env: Environment) → Environment
  changelog_insertion_flag: str
  changelog_mode: Literal['update', 'init']
  filters: tuple[Callable[..., Any], ...] = ()
  history: ReleaseHistory
  hvcs_type: str
  mask_initial_release: bool
  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)

  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', mask_initial_release: 'bool', license_name: 'str', filters: 'tuple[Callable[..., Any], ...]' = ())

  Bases: `object`

  bind_to_environment(env: Environment) → Environment
  filters: tuple[Callable[..., Any], ...] = ()
  hvcs_type: str
  license_name: str
  mask_initial_release: bool
  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

  Format the description text to fit within a specified width

semantic_release.changelog.context.convert_md_to_rst(md_content: str) → str

semantic_release.changelog.context.create_pypi_url(package_name: str, version: str = '') → str

semantic_release.changelog.context.make_changelog_context(hvcs_client: HvcsBase, release_history: ReleaseHistory, mode: ChangelogMode, prev_changelog_file: Path, insertion_flag: str, mask_initial_release: bool) → ChangelogContext

semantic_release.changelog.context.read_file(filepath: str) → str