commitizen-tools / commitizen

Create committing rules for projects :rocket: auto bump versions :arrow_up: and auto changelog generation :open_file_folder:
https://commitizen-tools.github.io/commitizen/
MIT License
2.52k stars 268 forks source link

Optional Developer Certificate of Origin (DCO) commit question #410

Open lobotmcj opened 3 years ago

lobotmcj commented 3 years ago

Description

A config option to include an additional question at the end of cz commit that displays the DCO and asks if the committer agrees to the DCO and, if yes, appends the line Signed-off-by: [NAME] <[EMAIL]> at the end of the commit message. [NAME] and [EMAIL] would be pulled from git config.

Possible Solutions

  1. See description.
  2. I suppose this could also be done instead as a third-party extension, but then what if you want a DCO question and also to use cz_legacy or conventional_jira?
  3. Is it possible to append a question to the cz_conventional_commits list via the json/toml file customization, or only to completely replace the list? If so, a partial solution to this feature request could just be a documentation edit to say how to do that.

Additional context

The Developer Certificate of Origin (DCO) is a lightweight alternative to a Contributor License Agreement (CLA). It's used by many prominent communities, such as:

There is also a GitHub App to support DCO's use

Some further reading Yet more info

Lee-W commented 3 years ago

Hi @lobotmcj , sorry for missing this issue. Currently, we've not yet enabled appending questions to existing cz rules. so the best solution for now is adding documentation. but if you have idea on how to implement this feature, we could discuss more as well.