Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/commit-parsing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ The default configuration options for
":robot:",
":green_apple:",
]
non_triggering_tags = [
":memo:",
":construction_worker:",
":recycle:",
]

.. _commit-parser-scipy:

Expand Down
3 changes: 3 additions & 0 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,9 @@ the expections from ``commit_parser`` value to default options value.
":apple:", ":penguin:", ":checkered_flag:", ":robot:",
":green_apple:"
]
non_triggering_tags = [
":memo:", ":construction_worker:", ":recycle:"
]

``"scipy"`` -> .. code-block:: toml

Expand Down
7 changes: 6 additions & 1 deletion semantic_release/commit_parser/emoji.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ class EmojiParserOptions(ParserOptions):
":robot:",
":green_apple:",
)
non_triggering_tags: Tuple[str, ...] = (
":memo:",
":construction_worker:",
":recycle:",
)
default_bump_level: LevelBump = LevelBump.NO_RELEASE


Expand All @@ -66,7 +71,7 @@ def get_default_options() -> EmojiParserOptions:

def parse(self, commit: Commit) -> ParseResult:
all_emojis = (
self.options.major_tags + self.options.minor_tags + self.options.patch_tags
self.options.major_tags + self.options.minor_tags + self.options.patch_tags + self.options.non_triggering_tags
)

message = str(commit.message)
Expand Down
2 changes: 1 addition & 1 deletion tests/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
]
EMOJI_COMMITS_MINOR = [
":sparkles: something special\n",
":sparkles::pencil: docs for something special\n",
":sparkles::memo: docs for something special\n",
":bug: needed a tweak\n",
"tweaked again\n",
"tweaked again\n",
Expand Down
18 changes: 13 additions & 5 deletions tests/unit/semantic_release/commit_parser/test_emoji.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,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
Expand Down