From 0f89750fcfa4862bc99d648b74e3d983e5c21432 Mon Sep 17 00:00:00 2001 From: Justin Pierce <2170989+justin-pierce@users.noreply.github.com> Date: Wed, 19 Jun 2024 00:42:40 -0400 Subject: [PATCH 1/2] test(parser-emoji): add unit tests for no-release triggering emoji commits --- tests/const.py | 2 +- .../commit_parser/test_emoji.py | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/tests/const.py b/tests/const.py index 69a7ca778..8ff979f2f 100644 --- a/tests/const.py +++ b/tests/const.py @@ -93,7 +93,7 @@ class RepoActionStep(str, Enum): ) EMOJI_COMMITS_MINOR = ( *EMOJI_COMMITS_PATCH, - ":sparkles::pencil: docs for something special\n", + ":sparkles::memo: docs for something special\n", # Emoji in description should not be used to evaluate change type ":sparkles: last minute rush order\n\nGood thing we're 10x developers :boom:\n", ) diff --git a/tests/unit/semantic_release/commit_parser/test_emoji.py b/tests/unit/semantic_release/commit_parser/test_emoji.py index c477579ec..4e2dcd597 100644 --- a/tests/unit/semantic_release/commit_parser/test_emoji.py +++ b/tests/unit/semantic_release/commit_parser/test_emoji.py @@ -42,20 +42,28 @@ [":bug: Fixing a bug", "The bug is finally gone!"], [], ), - # No release + # No release with specified emoji ( - ":pencil: Documentation changes", + ":memo: Documentation changes", + LevelBump.NO_RELEASE, + ":memo:", + [":memo: Documentation changes"], + [], + ), + # No release with random emoji + ( + ":construction: Work in progress", LevelBump.NO_RELEASE, "Other", - [":pencil: Documentation changes"], + [":construction: Work in progress"], [], ), # Multiple emojis ( - ":sparkles::pencil: Add a feature and document it", + ":sparkles::memo: Add a feature and document it", LevelBump.MINOR, ":sparkles:", - [":sparkles::pencil: Add a feature and document it"], + [":sparkles::memo: Add a feature and document it"], [], ), # Emoji in description From 9a859a6be62bb836b4a8933e1f33ee6f7f01bfd8 Mon Sep 17 00:00:00 2001 From: codejedi365 Date: Tue, 11 Nov 2025 19:43:33 -0700 Subject: [PATCH 2/2] feat(parser-emoji): adds more non-release triggering emojis to the default emoji parser --- src/semantic_release/commit_parser/emoji.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/semantic_release/commit_parser/emoji.py b/src/semantic_release/commit_parser/emoji.py index 801160208..e2fb5ae30 100644 --- a/src/semantic_release/commit_parser/emoji.py +++ b/src/semantic_release/commit_parser/emoji.py @@ -65,7 +65,12 @@ class EmojiParserOptions(ParserOptions): ) """Commit-type prefixes that should result in a patch release bump.""" - other_allowed_tags: Tuple[str, ...] = (":memo:", ":checkmark:") + other_allowed_tags: Tuple[str, ...] = ( + ":checkmark:", + ":construction_worker:", + ":memo:", + ":recycle:", + ) """Commit-type prefixes that are allowed but do not result in a version bump.""" allowed_tags: Tuple[str, ...] = (