ljnsn / cz-conventional-gitmoji

A commitizen plugin that combines gitmoji and conventional commits.
14 stars 2 forks source link

Question: expanded list of types #150

Open jzazo opened 4 months ago

jzazo commented 4 months ago

Hi! Is there any place where to look at the expanded list of types that will be recognized and converted to emojis? Is it an official list of gitmoji?

Also, what will happen when that expanded list is used for bumping packages with commitizen? Are the different categories assigned to default minor and/or partches?

Thanks.

ljnsn commented 4 months ago

Hi, only the emojis come from gitmoji, I've mapped them to types that match. It's a good point, that mapping is currently not documented anywhere. I'll add that somewhere more easily findable, in the meantime you can run cz commit or check the code here.

These are the bump pattern and bump map used by the plugin:

    bump_pattern = (
        rf"^(BREAKING[\-\ ]CHANGE"
        rf"|{GJ_BOOM}? ?boom"
        rf"|{GJ_FEAT}? ?feat"
        rf"|{GJ_FIX}? ?fix"
        rf"|{GJ_HOTFIX}? ?hotfix"
        rf"|{GJ_REFACTOR}? +refactor"
        rf"|{GJ_PERF}? ?perf)"
        r"(\(.+\))?"  # scope
        r"(!)?"  # breaking
    )

    bump_map = OrderedDict(
        (
            (r"^.+!$", MAJOR),
            (r"^BREAKING[\-\ ]CHANGE", MAJOR),
            (rf"^{GJ_BOOM}? ?boom", MAJOR),
            (rf"^{GJ_FEAT}? ?feat", MINOR),
            (rf"^{GJ_FIX}? ?fix", PATCH),
            (rf"^{GJ_HOTFIX}? ?hotfix", PATCH),
            (rf"^{GJ_REFACTOR}? ?refactor", PATCH),
            (rf"^{GJ_PERF}? ?perf", PATCH),
        )
    )

Any other types do not result in bumps by default, but you can overwrite that from your config.

jzazo commented 4 months ago

I hadn't realized cz commit lists all the types, it's a good source to look.

BTW, I realized there are missing spaces between the emoji and the following types: db, arch, types and deprecation.

Thanks!