Skip to content

Is it possible to get branch name in a adapter? #44

Open
@tjoskar

Description

@tjoskar

Hi,

First of all, great project!

Is it possible to pass information about a branch (or some other git information) to an custom adapter?

I find this line: https://github.com/commitizen/cz-cli/blob/master/src/cli/strategies/git-cz.js#L59 where it looks like you are passing all arguments to git(?). Is it possible to parse the arguments and exclude cz-cli-specific arguments and pass them to a adapter?

Example:

$ git cz --author="Name <email>" --cz-branch-name="$(git rev-parse --abbrev-ref HEAD)"

The command above should pass --author to git commit and --cz-branch-name to the adapter (because the argument starts with --cz-).

What do you think? Is this a good solution? Or is it a better way?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions