Code Monkey home page Code Monkey logo

husky's Introduction

logo

Husky

Build Status Release GitHub go.mod Go version Go Report Card GitHub GitHub issues

Make githooks easy!

Inspired from the husky.js


Husky - Git hooks made easy on go | Product Hunt

Docs

Installation

go install github.com/automation-co/husky@latest

Getting Started

You can initialise husky by $ husky init

Make sure you have git initialised

This will make the .husky folder with the hooks folder and a sample pre-commit hook

You can add hooks using

$ husky add <hook> "
  <your commands for that hook>
"

Example

$ husky add pre-commit "
  go build -v ./... 
  go test -v ./...
"

If you have made any other changes in the hooks you can apply them by using $ husky install


Blogs and Resources


Get Familiar with Git Hooks

Learn more about git hooks from these useful resources:


Other Alternatives

If you feel husky does not fulfill your needs you can also check out:


Developed by @automation-co

husky's People

Contributors

aarush-goyal avatar anikxt avatar hellosagar avatar robinsturmeit avatar tbhaxor avatar wizkaley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

husky's Issues

[FEAT] Support yaml configuration for windows OS

Is your feature request related to a problem? Please describe.

Shell script only works with posix system, but the windows user will not be able to use this application outside cgywin app.

Describe the solution you'd like

Instead of having a shell script, have a yaml file with command as array

version: 2.0
hooks:
   pre-commit:
       - whoami

Now the install command will create the hooks in the .git/hooks based on shell, powershell or cmd prompt.

Describe alternatives you've considered

N/A

Additional context

N/A

[FEAT] Auto-update the hooks

Is your feature request related to a problem? Please describe.
Any time when any hook is updated I have to run the command husky install to update the hooks.

Describe the solution you'd like
Instead of loading the hook every time just execute the script by referencing.

[Question]. Integration with go-task ( https://github.com/go-task/task )

Explain your question here
go-task is pretty cool compared to mage and make.

i was thinking about how the the husky hooks can be integrated with go-tasks.

here is a project that uses a task files extensively: https://github.com/yomorun/yomo

https://github.com/yomorun/yomo/blob/master/Taskfile.yml is the root shows some standard ci related things.

https://github.com/yomorun/yomo/blob/master/example/1-pipeline/Taskfile.yml shows how many processes and pipelines can be kicked off. you don't need to open multiple terminals. It manages the supervisions .

SO perhaps there is merit in using go task and husky together, so that you can manage the git hooks from the go task file.

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.