10000 feat(parser-emoji): ability to define other emoji by justin-pierce · Pull Request #963 · python-semantic-release/python-semantic-release · GitHub
[go: up one dir, main page]

Skip to content

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

justin-pierce
Copy link
@justin-pierce justin-pierce commented Jun 19, 2024

I didn't like how using emojis that didn't trigger a release would dump them all together in a generic "Other" category in release notes.

This simply lets you (optionally) define emoji in other_tags non_triggering_tags so they appear under their own header.

Side note: is there a reason the emoji id (like :construction_worker:) is used instead of the actual emoji (like 👷) in the default configuration? In my personal configurations I just use the actual emojis and it seems to work fine and I like that it renders the emoji in my IDE.

@codejedi365 codejedi365 self-requested a review June 21, 2024 15:17
Copy link
Contributor
@wyardley wyardley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea; might even be good to bake in some common non-triggering types as defaults (even for non-triggering types like docs / ci / chore)?

other_tags seems fine; maybe non_triggering_tags or something similar could also work?

I guess https://github.com/carloscuesta/gitmoji/blob/master/packages/gitmojis/src/gitmojis.json is the closest thing to a standard here?

@wyardley
Copy link
Contributor
wyardley commented Jun 21, 2024

Side note: is there a reason the emoji id (like 👷) is used instead of the actual emoji

Just commenting as a user here, but I do personally think having :foo: vs the actual emoji just seems safer to me somehow 🤷. Seems like it could be less likely for problems to come up around encoding or viewing the files at any rate.

8000

@justin-pierce
Copy link
Author
justin-pierce commented Jun 21, 2024

I like the idea; might even be good to bake in some common non-triggering types as defaults (even for non-triggering types like docs / ci / chore)?

Yeah for defaults I (at least think I) added:

  • :pencil: for docs (I use 📝:memo: but the tests here already mentioned :pencil: relating to docs so I kept it)
  • :construction_worker: for cicd
  • :recycle: for refactoring

Wasn't sure how far to take the defaults. I like gitmoji for reference (and used it for defaults other than what's noted) but I personally deviate a little and think simpler is better, as there can be some overlap/ambiguity when there's too many (and at some point it's annoying to remember them all when they get super specific). I think it'd at least make sense to change :pencil: to :memo: to match gitmoji.

other_tags seems fine; maybe non_triggering_tags or something similar could also work?

Yeah wasn't sure what to call it. I looked at how the other parsers worked but I preferred how the emoji parser didn't double up with an all list. non_triggering_tags also makes sense.

Just commenting as a user here, but I do personally think having :foo: vs the actual emoji just seems safer to me somehow 🤷. Seems like it could be less likely for problems to come up around encoding or viewing the files at any rate.

Yeah figured it was something along those lines -- just wanted to make sure I wasn't missing any specific risks when I use emoji themselves, as they seem to render everywhere I need them to (whereas the codes don't render in pycharm, for example). Also harder to have a typo when using actual emoji. Easy enough to customize so I don't think it's an issue, was just curious. 👍

@justin-pierce
Copy link
Author

went ahead and swapped :pencil: with :memo: and changed other_tags to non_triggering_tags

@codejedi365
Copy link
Contributor
codejedi365 commented Jun 24, 2024

Sorry for the delay, been traveling, hopefully get to the review this week.

Initially, I'm not seeing any (there are some adjustments to constants) testing changes related to the changelog generation you were hoping for so have you considered how to validate your fix and how to prevent it from regression later on? I do realize some of the changelog testing is complicated.

@justin-pierce
Copy link
Author
justin-pierce commented Jun 24, 2024

Sorry for the delay, been traveling, hopefully get to the review this week.

Initially, I'm not seeing any (there are some adjustments to constants) testing changes related to the changelog generation you were hoping for so have you considered how to validate your fix and how to prevent it from regression later on? I do realize some of the changelog testing is complicated.

Yeah was tough for me to parse the testing structure. I did add/edit these in test_emoji.py:

        # No release with specified emoji
        (
            ":memo: Documentation changes",
            LevelBump.NO_RELEASE,
            ":memo:",
            [":memo: Documentation changes"],
            [],
        ),
        # No release with random emoji
        (
            ":construction: Work in progress",
            LevelBump.NO_RELEASE,
            "Other",
            [":construction: Work in progress"],
            [],
        ),

My understanding is that this does test a commit message's effect on both the type of release and how it appears in changelogs. The first tests to make sure 📝 puts it under the 📝 header because 📝 is defined in the defaults. The second uses 🚧, which is not in the defaults, so it tests to confirm it's under the Other header (how it worked before this change).

Sounds like I'm missing something though?

Copy link
github-actions bot commented Sep 5, 2024

This PR is stale because it has not been confirmed or considered ready for merge by the maintainers but has been open 60 days with no recent activity. It will be closed in 10 days, if no further activity occurs. Please make sure to add the proper testing, docs, and descriptions of changes before your PR can be merged. Thank you for your contributions.

@codejedi365 codejedi365 added confirmed Prevent from becoming stale and removed stale confirmed Prevent from becoming stale labels Sep 7, 2024
@codejedi365
Copy link
Contributor

I'm sorry, this was my fault, I was extremely busy the past two months and I didn't get back to reviewing this PR a while back. I will review more over the weekend. I appreciate your contribution to the project.

@github-actions github-actions bot added the stale label Nov 6, 2024
@codejedi365 codejedi365 added confirmed Prevent from becoming stale and removed stale labels Nov 6, 2024
Copy link
github-actions bot commented Jan 6, 2025

It has been 60 days since the last update on this confirmed PR. @python-semantic-release/team can you provide an update on the status of this PR?

@github-actions github-actions bot added the needs-update Needs status update from maintainers label Jan 6, 2025
@github-actions github-actions bot removed the needs-update Needs status update from maintainers label Jun 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed Prevent from becoming stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0