Skip to content

Support --allow-merge-commits flag to skip validation of merge commits #133

@bagowix

Description

@bagowix

Hi!
Currently, conventional-pre-commit fails on merge commits because their commit messages (like Merge branch 'master' into feature/my-branch) do not follow the Conventional Commits standard.

It would be very useful to have an option like --allow-merge-commits to skip validation of merge commits automatically.

Use Case:

  • Developers merging master or other branches into feature branches.
  • CI pipelines where automatic merges happen.
  • Keeping history clean without manually editing merge commit messages.

Proposal:

  • Add a flag --allow-merge-commits.
  • If this flag is set, conventional-pre-commit should skip validation for commits that start with Merge ....
  • Ideally, detection could be done by checking if the commit message starts with Merge or using Git’s metadata.

Why it’s important:

  • Merge commits are common in many workflows.
  • Developers are forced to rewrite merge commit messages manually, which can break Git history clarity or cause frustration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions