Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

bug(cz_conventional_commits): cz check's schema_pattern is inconsistent with conventional commits spec #381

Closed
@shifqu

Description

@shifqu

Description

The schema_pattern used in ConventionalCommitsCz allows for a ! before the scope, while the spec states

  1. If included in the type/scope prefix, breaking changes MUST be indicated by a ! immediately before the :.

Steps to reproduce

  1. Run cz -n cz_conventional_commits check -m "feat!(scope): message"
  2. Observe the (wrongly) successful validation
  3. Run cz -n cz_conventional_commits check -m "feat(scope)!: message"
  4. Observe the (wrongly) failed validation

Current behavior

  • Command in 1) validates successfully
  • Command in 3) fails validations

Desired behavior

  • Command in 1) to fail validation (as the ! is not right before the :.)
  • Command in 3) to validate successfully (as it aligns with the conventional commits spec)

Environment

  • commitizen version: 2.17.4
  • python version: 3.8.8
  • operating system: Darwin (macOS 11.2.3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions