Skip to content

HenryGessau/sailr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A configurable Git hook for adhering to the Conventional Commit specification

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 83.0%
  • Python 10.0%
  • Makefile 7.0%