go-mitizen

command module
v1.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2022 License: MIT Imports: 9 Imported by: 0

README ยถ

Go-Mitizen

A Commitizen-like Git commit utility written in Go. Used for standardizing commit messages.

The commit form

Compared to cz-cli

  • ๐Ÿ‘ Starts significantly faster
  • ๐Ÿ‘ Doesn't require NPM
  • ๐Ÿ‘ Supports multiline bodies
  • ๐Ÿ‘ Configurable without NPM or JavaScript
  • ๐Ÿ‘Ž Not as configurable
  • ๐Ÿ‘Ž Isn't compatible with the full commitizen toolset

Installation

From Binary

Download and extract the appropriate binary for your platform from the releases page. Then run:

./go-mitizen --install
From Source

Download repository via Git or as a Zip. Then run:

go build
./go-mitizen --install

Usage

git cz [--install] [--version] [--log] [--dry]
Flags

--install: Install the application to be runnable via git cz.

--version: Print the application's version

--log: Write log messages to the logs.txt file in the working directory for debugging.

--dry: Print the commit message without performing a commit (useful for debugging)

Configuration

A configuration file will be looked for at config.gz.json in the root of the current repository. If this is not found then a global config will be looked for at ~/config.gz.json. If both files exist, only the first one found will be used.

The format of the config is simply:

{
    "<property>": "<new value>",
    ...
}

Any property not specified will resort to its default.

Properties
ForceSubjectLowerCase
  • Type: boolean
  • Default: true
  • Description: Convert all characters in the subject to lowercase.
ForceScopeLowerCase
  • Type: boolean
  • Default: true
  • Description: Convert all characters in the scope to lowercase.
AllowBlankLinesInBody
  • Type: boolean
  • Default: true
  • Description: Whether to remove any blank lines in the body of the commit (might be necessary for compatibility with other commitizen tools).
MaxHeaderLength
  • Type: int
  • Default: 100
  • Description: The number of characters allowed in the header of the commit. The utility will not allow the user to submit a header greater than this length.
MaxLineLength
  • Type: int
  • Default: 100
  • Description: The number of characters to allow in each line of the body and footer (length of header is set with MaxHeaderLength). Lines exceeding this length will be wrapped.
Types
  • Type: Array of {"name" : <string>, "description": <string>} objects
  • Default: See the code
  • Description: The types of commits that can be made.

Documentation ยถ

The Go Gopher

There is no documentation for this package.

Directories ยถ

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL