Skip to content

commitzen is not fully compatible with the latest conventional commit #199

Closed

Description

@guihao-liang

Type

  • Conent inaccurate

URL

Just realize this tool is not using a conventional commit spec,

$ cz schema
<type>(<scope>): <subject>
<BLANK LINE>
(BREAKING CHANGE: )<body>
<BLANK LINE>
<footer>

Whereas in conventional commit spec, BREAKING CHANGE should belong to footer.

Description

Is it by design?

I don't think this is fully compatible with conventional commit. I think you may need to mention this explicitly.

Activity

  1. changed the title [-][Documentation] Content to be added or fixed[/-] [+]commitzen is not fully compatible with the latest conventional commit[/+] on Jun 3, 2020
  2. woile commented on Jun 3, 2020

    @woile
    Member

    Hey! thanks for raising this issue.

    It may not match with v1.0.0, but v1.0.0-beta says:

    BREAKING CHANGE: a commit that has the text BREAKING CHANGE: at the beginning of its optional body or footer section introduces a breaking API change (correlating with MAJOR in semantic versioning). A breaking change can be part of either a fix: or feat: type commit

    https://www.conventionalcommits.org/en/v1.0.0-beta/

    if you only add body with this commitizen, then the body is also, technically, the footer.

    If you use BREAKING CHANGE in a body or in a footer, commitizen won't care and will pick it up, so it doesn't really matter to commitizen.

    I'd like to know how does this affect you, and if you could provide some use cases.

    What do you think @Lee-W should we add a new patch to comply with v1.0.0? I think the change would be small.

  3. guihao-liang commented on Jun 3, 2020

    @guihao-liang
    Author

    if you only add body with this commitizen, then the body is also, technically, the footer.

    If you use BREAKING CHANGE in a body or in a footer, commitizen won't care and will pick it up, so it doesn't really matter to commitizen.

    Thanks for the prompt reply! Got it. I just want to know whether adding BREAKING CHANGE to different places will cause any effect or not. I think it's better to mention this explicitly because I was reading the spec from 1.0.0 and I expect commitizen will comply with that spec. Other users may have the same expectations.

    One more question, does commitizen recognize !?

    appends a ! after the type/scope, introduces a breaking API change (correlating with MAJOR in semantic versioning)

  4. Lee-W commented on Jun 4, 2020

    @Lee-W
    Member

    @woile Yes, I think it would be better if we can comply with v1.0.0.

    @guihao-liang Yes, ! is recognized in default.py. @woile I'm thinking of moving some of these defaults into conventional_commits.py. These defaults do not seem to make sense to other cz (e.g., cz_jira)

  5. woile commented on Jun 4, 2020

    @woile
    Member

    Makes sense @Lee-W

  6. self-assigned this
    on Jul 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions