Skip to content

Latest commit

 

History

History
70 lines (51 loc) · 1.6 KB

README.md

File metadata and controls

70 lines (51 loc) · 1.6 KB

Sailr

Sailr helps you follow the Conventional Commits conventional by installing a configurable commit-msg into your Git projects.

Table of Contents

Prerequisites

To use Sailr, you must have jq installed.

Installing

curl -o- https://raw.githubusercontent.com/craicoverflow/sailr/master/scripts/install.sh | bash

Uninstalling

Remove the commit-msg Git hook from your project:

rm <your-project>/.git/hooks/commit-msg

Usage

Once installed, you must run git init in your Git projects to (re)initialize your repository. The hook will look for a configuration file in the following locations (in order):

  1. The root of your Git project.
  2. SAILR_CONFIG: You can set a custom location for your sailr.json config by setting the SAILR_CONFIG environment variable. Example: SAILR_CONFIG=$HOME/.sailr/sailr.json.
{
    "enabled": true,
    "revert": true,
    "length": {
        "min": 1,
        "max": 52
    },
    "types": [
        "build",
        "ci",
        "docs",
        "feat",
        "fix",
        "perf",
        "refactor",
        "style",
        "test",
        "chore"
    ]
}

Note: you can disable Sailr in your project by setting enabled to false in sailr.json.

Unit Testing

Unit tests are written in Python. They are located in ./tests

To run all tests:

make test