Skip to content

New command: cz init #57

@woile

Description

@woile

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions