All Projects → craicoverflow → sailr

craicoverflow / sailr

Licence: MIT license
A configurable Git hook for adhering to the Conventional Commit specification

Programming Languages

shell
77523 projects
python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to sailr

frolint
Frontend linter for developers
Stars: ✭ 26 (-67.5%)
Mutual labels:  githooks
istanbul-badges-readme
Creates and updates README testing coverage badges with your json-summary
Stars: ✭ 77 (-3.75%)
Mutual labels:  githooks
husky
No description or website provided.
Stars: ✭ 50 (-37.5%)
Mutual labels:  githooks

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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].