question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow multiline commit messages when using a custom .cz.toml

See original GitHub issue

Description

I would like to be able to write multiline commit messages, however this does not seem to be possible when configuring commitizen using .cz.toml.

Possible Solution

Based off of #74 it seems to work when you customize commitizen via a class, however the filter parameter in .cz.toml doesn’t seem to work for this use case currently (it gives me ValueError: 'filter' needs to be function that accepts an argument no matter what I input).

One suggestion would be if you could enclose your commit message in double quotes, and any enter keypress within those double quotes would just input a newline to the commit message instead of ending the text input. Another suggestion would be if you could specify a parameter multiline or similar which upon asking the question opens up a default editor (nano/vim) where the user writes their message, just like how git does with git commit.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:19 (15 by maintainers)

github_iconTop GitHub Comments

3reactions
Lee-Wcommented, Jul 9, 2021

Thanks @marier-nico ! Didn’t notice this cool new feature.

image

But the behavior would change a bit. If we apply this, we’ll need to type Esc, Enter or Alt, Enter when we type the message. Another idea is making it configurable. If not enabled, we’ll keep the original | behavior. @Woile What do you think?

1reaction
Lee-Wcommented, Aug 3, 2021

Hi @arunanshub , the feature you propose was actually discussed on https://github.com/commitizen-tools/commitizen/issues/248. But the problem of this issue I that we did not make our cz rules highly configurable except cz_cutsomize.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I make git commit messages divide into multiple lines?
Use the given as the commit message. If multiple -m options are given, their values are concatenated as separate paragraphs. In your case...
Read more >
Configuration - Commitizen
Variable Type Default name str "cz_conventional_commits" version str None version_files list
Read more >
git commit accepts several message flags - Stefan Judis
Create multiline git commits by using -m multiple times when using git commit.
Read more >
https://raw.githubusercontent.com/Woile/commitizen...
... #561 cz bump could not find the latest version tag with custom tag_format ... of commit message file ## v2.29.0 (2022-07-22) ###...
Read more >
Changelog — ox-hugo - Org to Hugo exporter
New custom variable `org-hugo-info-gnu-software`. ... Optimize a regex replacement in cliff.toml using ${0} (8831e49); Minor regex refactoring in cliff.toml ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found