/hookshot-ts

Hookshot-ts is a tiny library and companion CLI tool for handling GitHub post-receive hooks.

Primary LanguageTypeScript

This repository is fork of hookshot from GitHub user coreh.

Main goal of this project is to migrate the codebase from JavaScript to TypeScript

hookshot-ts

"You found the hookshot! It's a spring-loaded chain that you can cast out to hook things."

Intro

hookshot-ts is a tiny library and companion CLI tool for handling GitHub post-receive hooks.

Installation & building

npm install
npm run start  # Run once with ts-node
npm run dev    # Development mode

If you want to build binaries you need to install pkg package globally with npm.

To start the build process, run: npm run build

Binary downloads

Look up this GitHub's release page for downloads.

CLI Tools

The CLI tool takes as argument a command to execute upon GitHub post-receive hook:

hookshot 'echo "PUSHED!"'

You can specify following options:

  • HTTP port via the -p flag (default: 3000)
  • Webhook path via the -w flag (default: "/")
  • Run command on startup with -s
hookshot -p 9001 -s 'git pull origin master && npm install && npm start'