🔨 A more engineered, highly customizable, standard output format commitizen adapter.

Overview

cz-git-logo

cz-git

Commitizen-Adapter
commitizen-friendly GitHub Repo stars test-ci
npm npm-download

Github   |   Installation   |   Website   |   简体中文文档

Introduction

A more engineered, highly customizable, standard output format commitizen adapter.

demo-gif

What is commitizen: A Node.js-based git commit command-line tool that assists in generating standardized and standardized commit messages.

What is an adapter: Replace the interactive plugin for the commitizen command line tool.

Feature

  • Just to be a lazy man !!! Friendly command line tool, Supports search and selection on the command line, reducing spelling errors.
  • Highly Customizable, but the output format follows the standard Angular commit specification.
  • Better for monorepo engineering and commitlint project to give relevant verification information to the command line.
  • Better linking with issuePrefixs for issue | Support emoji in commit.

Usage

⇒ Get Started

Configure Template

⇒ Configure Template

Options

⇒ Show Related

⇒ Engineering Related

Recipes

⇒ Recipes

FAQ

⇒ FAQ

LICENSE

MIT Copyright (c) 2022-present Qiubin Zheng [email protected] (https://github.com/Zhengqbbb)

I just do my best to make thing well, Could you give a star to encourage me ?

Comments
  • [Feature Request] add `confirmCommit` in `skipQuestions`

    [Feature Request] add `confirmCommit` in `skipQuestions`

    ✅ Checklist

    • [X] I am using the latest version
    • [X] I have searched FAQ

    📄 System Info

    System:
        OS: macOS 12.6.1
        CPU: (8) arm64 Apple M1
        Memory: 966.95 MB / 16.00 GB
        Shell: 5.8.1 - /bin/zsh
      Binaries:
        Node: 18.12.1 - ~/Library/Caches/fnm_multishells/13083_1670507240516/bin/node
        Yarn: 1.22.19 - ~/Library/Caches/fnm_multishells/13083_1670507240516/bin/yarn
        npm: 9.1.3 - ~/Library/Caches/fnm_multishells/13083_1670507240516/bin/npm
        Watchman: 2022.11.28.00 - /opt/homebrew/bin/watchman
      npmPackages:
        czg: ^1.4.0 => 1.4.0
    

    🔎 Description

    Concise Description

    I'm trying to skip the confirmCommit step by adding it to the skipQuestions array in .commitlintrc.js

    skipQuestions: ['body', 'breaking', 'footerPrefix', 'footer', 'confirmCommit'],

    But doing so causes vim to open with an empty commit message

    Expected behavior

    Should be able to skip the confirmCommit step. A commit should be made directly if we reach the end of the czg steps.

    Steps to reproduce

    Add 'confirmCommit' to the skipQuestions array

    Screenshots or Screen Recording(if possible)

    🔗 Reproduction link / repo:

    No response

    enhancement next version 
    opened by FatehAK 15
  • [Feature Request] Set default issue prefix without prompt

    [Feature Request] Set default issue prefix without prompt

    💭 Describe the feature

    I would like to set the default issue prefix: Issues:. At the moment I can achieve that with:

        prompt: {
            issuePrefixs: [{ value: "Issues:", name: "default" }],
            customIssuePrefixsAlign: "bottom",
        }
    

    but I would be anyway prompted to choose the ISSUES type.

    I tried changing emptyIssuePrefixsAlias and customIssuePrefixsAlias to "", but with no effect.

    I also tried skipQuestions: ["footerPrefix"], but then there's no prefix used at all.

    💡 Proposed Solution

    Additional boolean options similar to the Scopes one: allowCustomIssuePrefixs and allowEmptyIssuePrefixs and no prompt when there's only one issuePrefixs configured.

    enhancement 
    opened by jaklan 13
  • [Ask For Help] the emojis are not showing in the CLI.

    [Ask For Help] the emojis are not showing in the CLI.

    💭 Describe the feature

    I have couple questions:

    • What is diff betn. cz and czg
    • When to use .commitlintrc.js and cz.config.js and Do I need to install extra packages in case of .commitlintrc.js?
    • I've tried to use emoji-template as described but with cz.config.js in the root folder but the emojis are not showing in the CLI. I am using normal configs
      "config": {
        "commitizen": {
          "path": "node_modules/cz-git"
        }
      },
    
    

    Thanks

    💡 Proposed Solution

    Appreciate all efforts in the documentation but this part needs to be clarified specially the part of czg

    enhancement 
    opened by tomavic 12
  • [Bug report] cz git 请求失败是不是将代码回退 ?

    [Bug report] cz git 请求失败是不是将代码回退 ?

    ✅ Checklist

    • [X] I am using the latest version
    • [X] I have searched FAQ

    📄 System Info

    请求失败是不是将代码回退 ?
    

    🔎 Description

    Concise Description

    请求失败是不是将代码回退 ?

    Expected behavior

    Steps to reproduce

    Screenshots or Screen Recording(if possible)

    🔗 Reproduction link / repo:

    No response

    not bug | wontfix 
    opened by jahnli 10
  • [Feature Request] Set 'allowEmptyScopes' based on commitlint config

    [Feature Request] Set 'allowEmptyScopes' based on commitlint config

    💭 Describe the feature

    Respect commitlint option about empty scopes by default, when there's no option set for cz-git explicitly:

      rules: {
        "scope-empty": [2, "never"]
      }
    

    https://commitlint.js.org/#/reference-rules?id=scope-empty

    💡 Proposed Solution

    Fallback to commitlint config when the cz-git one is not specified directly.

    If the commitlint setting is in the warning mode (1) instead of the error one (2), we could either ignore it or maybe provide some additional message.

    enhancement 
    opened by jaklan 10
  • [Feature Request] Can use 'prepare-commit-msg' hook `--no-edit`

    [Feature Request] Can use 'prepare-commit-msg' hook `--no-edit`

    💭 Describe the feature

    We are using czg as part of husky's 'prepare-commit-msg' hook like so -

    exec < /dev/tty && npx --no-install czg --hook || true

    It works as expected but it open the vim editor unnecessarily at the end.

    Is it possible to add a flag --no-edit so that the editor is not opened at the end?

    💡 Proposed Solution

    Add a preventEditorOpen flag which can be false by default and we can set it to true from .commitlintrc.js

    If the preventEditorOpen flag is true then the git commit command will be git commit --no-edit

    enhancement 
    opened by FatehAK 9
  • [Feature Request] a config for `body-leading-blank` in commitlint

    [Feature Request] a config for `body-leading-blank` in commitlint

    💭 Describe the feature

    Is it possible to add a config for body-leading-blank option in commitlint?

    💡 Proposed Solution

    By setting an option bodyLeadingBlank to true in a config file, a new line will be added between commit subject and body.

    enhancement 
    opened by tui95 9
  • [Feature Request] v1.3.9 plan: add `emojiAlign`  | add `alias`

    [Feature Request] v1.3.9 plan: add `emojiAlign` | add `alias`

    💭 Describe the feature

    • [x] add emojiAlign support emoji is placed before type
    • [x] add alias to directly output the defined commit message

    💡 Proposed Solution

    Add emojiAlign

    support emoji is placed before type The format alignment is really nice, but considering the validation with following Angular commit, the default is center

    • type: "left" | "center" | "right"
    image

    Add alias

    We may encounter commit messages that are often output, such as docs: fix typos, if we define like.

    {
     "alias": {
         "df": "docs: fix typos"
      }
    }
    

    Usage:

    1. czg :df
    2. czg --alias="df"
    3. cz_alias="df" git cz
    4. cz_alias="df" cz

    You can directly output docs: fix typos commit message It will be awesome and convenient.

    enhancement next version 
    opened by Zhengqbbb 9
  • [Feature Request] Custom formatter

    [Feature Request] Custom formatter

    💭 Describe the feature

    I've been using commitizen-emoji for a while now, and found this library as a way to remove duplicated configs between commitzen and commitlint.

    But, currently I see you only support the angular output; and with no clear way, in my testing, to replace or omit the type output.

    the commit format I'm targeting is as follows:

    <gitmoji>(<scope>): <subject>

    scope being optional

    Compared to Default Angular Commits <type>(<scope>): <subject>

    Currently with cz-git I've managed to create commits like

    feat: ✨ <subject>
    feat(<scope>): ✨ <subject>
    

    But I'm aiming for something like

    ✨ <subject>
    ✨ (<scope>): <subject>
    

    💡 Proposed Solution

    Enable users to customize their formatter with:

    • sending their own custom function: receiving arguments corresponding to answers from the form view, and returning a string (title);
    • implement a boolean argument conventionalFormat with default true, to enable the user to opt out of angular commit style

    Example:

    formatTitle.ts

    export const formatTitle: FormatTitleType = ({ type, scope, subject }, config) => {
      const formattedScope = formatScopeOption(scope)
      const prelude = config.conventionalFormat
        ? `${type.emoji} ${type.name}${formattedScope}:`
        : `${type.emoji}${formattedScope ? ' ' + formattedScope + ':' : ''}`
    
      return `${prelude} ${subject}`
    }
    

    Example usage

    const arguments = {
      type: {
        emoji: '✨',
        name: 'feat',
      },
      scope: 'mobile',
      subject: 'login screen'
    }
    
    console.log(formatTitle(arguments, {conventionalFormat: true}))  // ✨ feat (mobile): login screen
    console.log(formatTitle(arguments, {conventionalFormat: false})) // ✨ (mobile): login screen
    

    I believe there's some work to do on field type....type (ts typing) and fine-tuning, but I'm open to help in the conversation

    enhancement next version 
    opened by thlmenezes 7
  • [Feature Request] respect 'defaultScope' when using scope list

    [Feature Request] respect 'defaultScope' when using scope list

    💭 Describe the feature

    Currently, when you provide the list of accepted scopes in the config, you select one in prompt by moving with arrows. The first scope highlighted is the first scope provided in the list. defaultScope option has no effect.

    💡 Proposed Solution

    My proposal would be to actually respect defaultScope, so that you can set its value to one of the accepted scopes and move it to the top of scopes list, so it becomes the first one proposed.

    If the defaultScope value is not in the scopes list, we can ignore it / show some error.

    enhancement 
    opened by jaklan 7
  • [Feature Request] Support for multiple scopes

    [Feature Request] Support for multiple scopes

    💭 Describe the feature

    commitlint provides support for multiple scopes: https://commitlint.js.org/#/concepts-commit-conventions?id=multiple-scopes

    When you use @commitlint/cz-commitlint adapter, you can enable support for that in commitizen as well by providing the following options in commitlint config:

      prompt: {
        settings: {
          enableMultipleScopes: true
          scopeEnumSeparator: ","
        },
      }
    

    https://commitlint.js.org/#/reference-prompt?id=settings

    Then, you can select multiple scopes in commitizen with space and confirm with enter. If empty scopes are forbidden, if no scope is selected you get the hint you need to select at least one to continue.

    💡 Proposed Solution

    To respect the above configuration. The one issue I see is the fact that in cz-git space is used as input to search, but imho in that case we can "override" its behaviour to select the scope instead - scopes with spaces are rather rare use-case, so imho such a compromise should be quite acceptable. Or we can just think about another keystroke to trigger scope selection / unselection (right arrow to select, left arrow to unselect?).

    enhancement 
    opened by jaklan 7
Releases(v1.4.1)
Owner
zhengqbbb
🤯 >/dev/null
zhengqbbb
javascript library to convert a list of objects to a nested json output format, depending on the names in the list

formToNestedJson javascript "library" to convert a list of objects to a nested json output format, depending on the names in the list Basic usage Give

null 2 Aug 2, 2021
A highly customizable platform ready to be a portfolio website, and become a lot more with some of your own components

Vextra Elegant and animated portfolio website. Demo: vextra.vercel.app Vextra is a portfolio template, packed with animations with a satisfying flow t

null 3 Sep 19, 2022
An npm package for demonstration purposes using TypeScript to build for both the ECMAScript Module format (i.e. ESM or ES Module) and CommonJS Module format. It can be used in Node.js and browser applications.

An npm package for demonstration purposes using TypeScript to build for both the ECMAScript Module format (i.e. ESM or ES Module) and CommonJS Module format. It can be used in Node.js and browser applications.

Snyk Labs 57 Dec 28, 2022
Type Identity - a powerful and highly customizable authentication and authrozation and access-control framework

Type Identity is a powerful and highly customizable authentication and authrozation and access-control framework. It is the de-facto standard for securing Type Script api beta release

Saeed Mohammed Al-abidi 2 Jan 1, 2023
Highly customizable checkboxes and radio buttons (jQuery & Zepto)

iCheck plugin 1.0.3 Highly customizable checkboxes and radio buttons for jQuery and Zepto. Refer to the iCheck website for examples. Note: iCheck v2.0

Dar Gullin 7.4k Dec 25, 2022
`raaghu-mfe` is an opensource micro front end framework built on top of `raaghu-elements`, Bootstrap 5 and Storybook offering highly customizable UI components and built-in pages

`raaghu-mfe` is an opensource micro front end framework built on top of `raaghu-elements`, Bootstrap 5 and Storybook offering highly customizable UI components and built-in pages. Raaghu mfe can be used as a base to build complex components and UI layouts whilst maintaining a high level of reusability,flexibility with ease of maintenance.

Wai Technologies 160 Dec 30, 2022
This simple library allows you to create awesome responsive and highly customizable popups importing just one JavaScript file.

Creativa - Popup This is a simple library that allows you to create awesome popups importing just one JavaScript file. Getting started You can import

Eduardo Mollo 5 Mar 29, 2022
🛡️ Dead-simple, yet highly customizable security middleware for Apollo GraphQL servers and Envelop 🛡️

GraphQL Armor ??️ GraphQL Armor is a dead-simple yet highly customizable security middleware for various GraphQL server engines. Contents Contents Sup

Escape – GraphQL Security 267 Jan 9, 2023
Highly customizable checkboxes and radio buttons (jQuery & Zepto)

iCheck plugin 1.0.3 Highly customizable checkboxes and radio buttons for jQuery and Zepto. Refer to the iCheck website for examples. Note: iCheck v2.0

Dar Gullin 7.5k Aug 24, 2022
A highly customizable homepage (or startpage / application dashboard) with Docker and service API integrations.

Features Web Bookmarks Service Bookmarks Docker Integration Status light + CPU, Memory & Network Reporting (click on the status light) Service Integra

Ben Phelps 3.5k Dec 30, 2022
jQuery easy ticker is a news ticker like plugin, which scrolls the list infinitely. It is highly customizable, flexible with lot of features and works in all browsers.

jQuery Easy Ticker plugin jQuery easy ticker is a news ticker like plugin which scrolls a list infinitely. It is highly customizable, flexible with lo

Aakash Chakravarthy 208 Dec 20, 2022
A beautiful, responsive, highly customizable and accessible replacement for JavaScript's popup boxes. Zero dependencies.Alerts ,dialogs

AsgarAlert (v1) for JS Install <script defer src="/asgar-alert.js"></script> Examples The most basic message: asgar("Hello world!"); A message signali

Asgar Aliyev 5 Dec 20, 2022
Easy to setup and highly customizable leaderboard with built-in score validation system.

EasyLeaderboard Add a leaderboard to your game in under 10 minutes! ?? Ready to go game clients make adding a leaderboard quick and easy ??️ Extendabl

Garrett Allen 12 Sep 30, 2022
An adapter where you can define which function to run

Switch Functions An adapter where you can define which function to run Installation This is a Node.js module available through the npm registry. Befor

Badass Team 2 Jun 17, 2022
Minimal template engine with compiled output for JavaScript.

@fnando/seagull Minimal template engine with compiled output for JavaScript. Installation This package is available as a NPM package. To install it, u

Nando Vieira 5 Mar 1, 2022
A Feathers service adapter for Prisma ORM.

feathers-prisma A Feathers service adapter for Prisma ORM. Installation npm install feathers-prisma --save Documentation This adapter supports all me

Phil 27 Dec 9, 2022
Logs the output, time, arguments, and stacktrace of any function when it's called in a gorgeous way.

Function.prototype.log Logs the output, time, arguments, and stacktrace of any function when it's called. How to use: Like this: function yourFunction

--Explosion-- 4 Apr 9, 2022
Group and sort Eleventy’s verbose output by directory (and show file size with benchmarks)

eleventy-plugin-directory-output Group and sort Eleventy’s verbose output by directory (and show file size with benchmarks). Sample output from eleven

Eleventy 16 Oct 27, 2022
A string of four operations of the library, can solve the js digital calculation accuracy of scientific notation and formatting problems, support for thousands of decimal point formatting output operations

A string of four operations of the library, can solve the js digital calculation accuracy of scientific notation and formatting problems, support for thousands of decimal point formatting output operations

null 10 Apr 6, 2022