semantic_release.commit_parser.emoji module

Commit parser which looks for emojis to determine the type of commit

class semantic_release.commit_parser.emoji.EmojiCommitParser(options: EmojiParserOptions | None = None)[source]

Bases: CommitParser[ParsedCommit | ParseError, EmojiParserOptions]

Parse a commit using an emoji in the subject line. When multiple emojis are encountered, the one with the highest bump level is used. If there are multiple emojis on the same level, the we use the one listed earliest in the configuration. If the message does not contain any known emojis, then the level to bump will be 0 and the type of change “Other”. This parser never raises UnknownCommitMessageStyleError. Emojis are not removed from the description, and will appear alongside the commit subject in the changelog.

static get_default_options() EmojiParserOptions[source]
parse(commit: Commit) ParsedCommit | ParseError[source]

Attempt to parse the commit message with a regular expression into a ParseResult

parse_message(message: str) ParsedMessageResult[source]
parser_options

alias of EmojiParserOptions

class semantic_release.commit_parser.emoji.EmojiParserOptions(major_tags: Tuple[str, ...] = (':boom:',), minor_tags: Tuple[str, ...] = (':sparkles:', ':children_crossing:', ':lipstick:', ':iphone:', ':egg:', ':chart_with_upwards_trend:'), patch_tags: Tuple[str, ...] = (':ambulance:', ':lock:', ':bug:', ':zap:', ':goal_net:', ':alien:', ':wheelchair:', ':speech_balloon:', ':mag:', ':apple:', ':penguin:', ':checkered_flag:', ':robot:', ':green_apple:'), allowed_tags: Tuple[str, ...] = (':boom:', ':sparkles:', ':children_crossing:', ':lipstick:', ':iphone:', ':egg:', ':chart_with_upwards_trend:', ':ambulance:', ':lock:', ':bug:', ':zap:', ':goal_net:', ':alien:', ':wheelchair:', ':speech_balloon:', ':mag:', ':apple:', ':penguin:', ':checkered_flag:', ':robot:', ':green_apple:'), default_bump_level: LevelBump = LevelBump.NO_RELEASE)[source]

Bases: ParserOptions

allowed_tags: Tuple[str, ...] = (':boom:', ':sparkles:', ':children_crossing:', ':lipstick:', ':iphone:', ':egg:', ':chart_with_upwards_trend:', ':ambulance:', ':lock:', ':bug:', ':zap:', ':goal_net:', ':alien:', ':wheelchair:', ':speech_balloon:', ':mag:', ':apple:', ':penguin:', ':checkered_flag:', ':robot:', ':green_apple:')
default_bump_level: LevelBump = 0
major_tags: Tuple[str, ...] = (':boom:',)
minor_tags: Tuple[str, ...] = (':sparkles:', ':children_crossing:', ':lipstick:', ':iphone:', ':egg:', ':chart_with_upwards_trend:')
patch_tags: Tuple[str, ...] = (':ambulance:', ':lock:', ':bug:', ':zap:', ':goal_net:', ':alien:', ':wheelchair:', ':speech_balloon:', ':mag:', ':apple:', ':penguin:', ':checkered_flag:', ':robot:', ':green_apple:')