Skip to content

Unclear documentation for commit_parser #405

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

Closed
1 of 3 tasks
haverchuck opened this issue Jul 14, 2021 · 1 comment
Closed
1 of 3 tasks

Unclear documentation for commit_parser #405

haverchuck opened this issue Jul 14, 2021 · 1 comment

Comments

@haverchuck
Copy link

haverchuck commented Jul 14, 2021

Type

  • Content inaccurate
  • Content missing
  • Typo

URL

https://commitizen-tools.github.io/commitizen/customization.html#custom-changelog-generator

Description

I am trying to generate multiple changelogs for different packages under a monorepo. I was hoping to have a seperate cz config file in each package, execute the changelog command in each package, and filter out the commits based on scope. It was unclear to me whether the commit parser is the way to accomplish this, and if so, how to go about it.

Apologies if I am way off track!

@woile
Copy link
Member

woile commented Jul 25, 2021

Sorry for the delay, feel free to ask no worries.
At the moment commitizen is not able to handle a monorepo (different packages under the same repository).
It would be an interesting feature, and there's a request for it:
#365

But because of time constrains we (the maintainers) are not working on it.

Going back to your question, the commit_parser is the regular expression that maps to your commit message convention.

If you have used regex, you'll know that you can set variables, by using the (?P<name_of_variable>). If you write your own regex, you should provide the variables listed here

A very basic example: you commit convention uses MAJOR, MINOR, PATCH at the beginning, so one of the variables is change_type. Your regex should include something like this:

^(?P<change_type>MAJOR|MINOR|PATCH)

Comimt examples:

PATCH: Fix security issue
MAJOR: Delete user last name
MINOR: Add new feature profile

Feel free to open the ticket if you need so.

@woile woile closed this as completed Jul 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants