Skip to content

MateusZitelli/hookit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hookit
WebHooks as easy as it can get

Hookit automatically creates and listens to GitHub WebHooks, running a specified command after push events.

  • Simple usage - see the example.
  • Signated WebHooks by default.
  • No dependencies.

Hookit usage

Setup

Download and make Hookit Python script available for usage:

$ curl https://raw.githubusercontent.com/MateusZitelli/hookit/master/hookit > /usr/local/bin/hookit; chmod +x /usr/local/bin/hookit

Usage

1. Create GitHub Access Token

Create an access token here with the write:repo_hook scope.

2. Create a configuration file

With the GitHub access token in hands create a configuration file named .env:

GITHUB_ACCESS_TOKEN=<The created Access Token>
REPOSITORY_NAME=Username/Repository
CALLBACK_URL=http://HOST:PORT
HOOK_SECRET=<A hash to be used for validation>
ON_PUSH_CALL=echo "Such a push"

3. Execute Hookit

And then execute Hookit on the folder with the .env file:

$ hookit

Now every push to the repository Username/Repository will trigger the script echo "Such a push".

Licence

MIT License

Releases

No releases published

Packages

No packages published

Languages