Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(parser-emoji): ability to define other emoji#963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
justin-pierce wants to merge1 commit intopython-semantic-release:master
base:master
Choose a base branch
Loading
fromoctophases:other-emoji
Open
Show file tree
Hide file tree
Changes fromall 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 deletionsdocs/commit-parsing.rst
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionsdocs/configuration.rst
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionsemantic_release/commit_parser/emoji.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletiontests/const.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionstests/unit/semantic_release/commit_parser/test_emoji.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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

[8]ページ先頭

©2009-2025 Movatter.jp