Giter Club home page Giter Club logo

chowchow's Introduction

Chowchow

Dependency-less (almost) per user customisable git hooks

Dependency-less?

It uses no npm modules, but does require ruby to be somewhere on your $PATH. (we use it read yaml).

Whats wrong with Husky?

Nothing that much I guess, but I don't like automatically installing git hooks on other peoples machines without consent and enforcing workflows on them. Such things should be both opt-in and easily opt-out-able from any point. Show people a path but don't force them down it, you don't knows whats best for them.

Basic Usage

You don't actually need to add this module to your project's package.json for simple usage.

Install the githook scripts by running

npx @sandfox/chowchow install

installation will fail if there are any non chowchow created hooks installed as chowchow would permanently overwrite them, use --force if your fine with that

and then create a chowchow.yml file in the root of your project with any commands you want for each of the git hooks you are interested in. Any arguments that git would normally supply to a hook are available in $GIT_PARAMS.

pre-commit:
    - npm test

post-checkout:
    - yarn install
    - ./scripts/log $GIT_PARAMS

commit-msg:
    - ./scripts/something
    - ./scripts/add-metadata

If at anytime you want to stop chowchow from running, either comment out or move the .chowchow.yml file, or run

npx @sandfox/chowchow uninstall

to remove all of it's git hooks from .git/hooks. It will only delete hooks that chowchow created.

How it works

Upon installation a bash script is installed into git/hooks for each possible git hook (that chowchow knows about).

When the hook is triggered by git, the bash script checks the .chowchow.yml file for a section corresponding to the name of hook and for each item it finds, evals the item.

License

GPL-3.0 See LICENSE for full terms.

chowchow's People

Contributors

rigellute avatar sandfox avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

rigellute

chowchow's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.