Skip to content

jivimberg/kotlin-githook

Repository files navigation

Writing githooks in Kotlin

Code repository for article "Writing githooks in Kotlin"

Requirements

To be able to run Kotlin as a script you'll need to install KScript you can find the installation instructions here.

Running it

Doing a gradle build will install the githook pre-push script. You can check this line to see how this is achieved.

Next time you do git push the script will be executed. As part of the script gradle check will be executed. If the run is successful you'll be able to push, otherwise the push will be aborted.

For a more in-depth explanation of the code check the article: https://jivimberg.io/blog/2018/07/03/writing-githooks-in-kotlin/

About

Example repository showing how to write a githook in Kotlin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages