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.

New command: cz init

See original GitHub issue

Goal

Make it easier for users to use commitizen

Description

Let’s suppose we have an already existing repo without commitizen. The user types cz init and we try to be smart and detect some information:

  1. Find last tag and ask if that is the latest tag. If not prompt which is the latest tag.
  2. With that data we can fill the version in [tool.commitizen].
  3. Detect if the tag begins with v or not and define the tag_format in [tool.commitizen]
  4. Find files with a reference to the latest version and define the files in [tool.commitizen], we could let the user choose which files from the found should be added (with a multi-choice from questionary).
  5. Ask to the user if they want the changelog to be generated from scratch if not present.

This is my initial draft, I’m not sure what else could be detected. Potentially we could ask for every configuration, but it’s important to keep it short. It’s not about customizing, but initializing quickly. If the user wants to customize more -> read the docs.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
woilecommented, Dec 30, 2019

Released on 1.12.0 🎉

1reaction
Lee-Wcommented, Nov 23, 2019

Maybe we can discuss more on the “vesrion_files” part in the future, I’ll first work on the refactoring and other functionaility of init.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Init - Commitizen
For new projects, it is possible to run cz init . This command will prompt the user for information about the project and...
Read more >
The commitizen command line utility. #BlackLivesMatter
Simply use git cz or just cz instead of git commit when committing. You can also use git-cz , which is an alias...
Read more >
CZ-cli: The Commitizen Command Line Utility - Morioh
In today's post we will learn about CZ-cli: The commitizen command line utility. #BlackLivesMatter. Commitizen for contributors.
Read more >
git-cz - npm
npm install -g commitizen git-cz commitizen init git-cz --save-dev --save-exact ... value: 'docs' }, feat: { description: 'A new feature', ...
Read more >
commitizen/README.md - UNPKG
commitizen/README.md ; 35 ; 36, Next, initialize your project to use the cz-conventional-changelog adapter by typing: ; 37 ; 38, ``` ; 39,...
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