commitsar

command module
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2020 License: MIT Imports: 8 Imported by: 0

README

Commitsar

Go Report Card Test GitHub release (latest by date) GitHub commits since latest release Conventional Commits Run on Repl.it

Tool to make sure your commits are compliant with conventional commits. It is aimed mainly at CIs to prevent branches with commits that don't comply. Usage as a pre-commit hook is also under consideration.

Table of contents

  1. Usage
  2. Flags

Usage

Please check Documentation.

Important: Commitsar currently needs to be run in the same folder as the git repository you want checked, currently no override is provided for setting path to git repo see https://github.com/aevea/commitsar/issues/93

Running using https://gobinaries.com/
curl -sf https://gobinaries.com/aevea/commitsar | sh

Or a specific version:

curl -sf https://gobinaries.com/aevea/commitsar[@VERSION] | sh
Github action

Checkout git in order to get commits and master branch

- name: Check out code into the Go module directory
        uses: actions/checkout@v1

Run the Commitsar action

- name: Commitsar Action
  uses: docker://aevea/commitsar
Example for CircleCI:
validate-commits:
	    docker:
	      - image: aevea/commitsar
	    steps:
	      - checkout
	      - run: commitsar
From binary

Adjust for version and distribution. Please check Releases.

- curl -L -O https://github.com/aevea/commitsar/releases/download/v0.0.2/commitsar_v0.0.2_Linux_x86_64.tar.gz
- tar -xzf commitsar_v0.0.2_Linux_x86_64.tar.gz
- ./commitsar

Flags

Commitsar allows the following flags:

Name Flag Required Default Description
Verbose --v false false Debug output into console
Strict --s false true Strict check of category types
All --all false false Whether to check all commits on given branch. Takes precedence over LIMIT flag

On top of that a single argument is allowed:

commitsar <from commit>...<to commit>

e.g. commitsar 7dbf3e7db93ae2e02902cae9d2f1de1b1e5c8c92...d0240d3ed34685d0a5329b185e120d3e8c205be4

If only one commit hash is used then commitsar will assume it to be the TO commit.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
pkg
text
Package text contains functions to parse Git Commit texts and some basic helpers for identifying type of commit by its message.
Package text contains functions to parse Git Commit texts and some basic helpers for identifying type of commit by its message.

Jump to

Keyboard shortcuts

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