Skip to content
Back to top
View this page

# semantic_release.commit_parser.angular module

Angular commit style parser https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines

class semantic_release.commit_parser.angular.AngularCommitParser(options: AngularParserOptions | None = None)

  Bases: `CommitParser`[`ParsedCommit` | `ParseError`, `AngularParserOptions`]

  A commit parser for projects conforming to the angular style of conventional commits. See https://www.conventionalcommits.org/en/v1.0.0-beta.4/

  commit_body_components_separator(accumulator: dict[str, list[str]], text: str) → dict[str, list[str]]
  static get_default_options() → AngularParserOptions
  static is_merge_commit(commit: Commit) → bool
  parse(commit: Commit) → ParsedCommit | ParseError | list[ParsedCommit | ParseError]

    Parse a commit message

    If the commit message is a squashed merge commit, it will be split into multiple commits, each of which will be parsed separately. Single commits will be returned as a list of a single ParseResult.

  parse_commit(commit: Commit) → ParsedCommit | ParseError
  parse_message(message: str) → ParsedMessageResult | None
  parser_options

    alias of `AngularParserOptions`

  unsquash_commit(commit: Commit) → list[Commit]
  unsquash_commit_message(message: str) → list[str]

class semantic_release.commit_parser.angular.AngularParserOptions(minor_tags: Tuple[str, ...] = ('feat',), patch_tags: Tuple[str, ...] = ('fix', 'perf'), other_allowed_tags: Tuple[str, ...] = ('build', 'chore', 'ci', 'docs', 'style', 'refactor', 'test'), allowed_tags: Tuple[str, ...] = ('feat', 'fix', 'perf', 'build', 'chore', 'ci', 'docs', 'style', 'refactor', 'test'), default_bump_level: LevelBump = LevelBump.NO_RELEASE, parse_squash_commits: bool = False, ignore_merge_commits: bool = False)

  Bases: `ParserOptions`

  Options dataclass for AngularCommitParser

  allowed_tags: Tuple[str, ...] = ('feat', 'fix', 'perf', 'build', 'chore', 'ci', 'docs', 'style', 'refactor', 'test')

    All commit-type prefixes that are allowed.

    These are used to identify a valid commit message. If a commit message does not start with one of these prefixes, it will not be considered a valid commit message.

  default_bump_level: LevelBump = 0

    The minimum bump level to apply to valid commit message.

  ignore_merge_commits: bool = False

    Toggle flag for whether or not to ignore merge commits

  minor_tags: Tuple[str, ...] = ('feat',)

    Commit-type prefixes that should result in a minor release bump.

  other_allowed_tags: Tuple[str, ...] = ('build', 'chore', 'ci', 'docs', 'style', 'refactor', 'test')

    Commit-type prefixes that are allowed but do not result in a version bump.

  parse_squash_commits: bool = False

    Toggle flag for whether or not to parse squash commits

  patch_tags: Tuple[str, ...] = ('fix', 'perf')

    Commit-type prefixes that should result in a patch release bump.

  property tag_to_level: dict[str, LevelBump]

    A mapping of commit tags to the level bump they should result in.