Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pandahook

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pandahook

Githook Script Management Made Easy

  • 0.1.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

PandaHook

The Ultimate Tool to Manage and Deploy Githook Scripts.


Githooks are powerful tools. Whatever you can script can be triggered from nothing but a git command. PandaHook helps you manage this magic.

PandaHook is designed to not only assist you in generating githook scripts, but also setting them up in a remote server. PandaHook is meant to be your Swiss Army knife, so it features a modular design with multiple sub-commands to keep the codebase manageable and future-friendly.

Installation

PandaHook is easily installed as a global npm package. You will need CoffeeScript installed.

  npm install -g coffee-script
  npm install -g pandahook

Usage Example

To see how PandaHook is used, you'll need a couple things:

  1. The hook-server, a remote server to host your server-side githooks.
  2. The configuration dotfile, .pandahook.cson, completed for your use-case and placed into your local $HOME directory (ie, at ~/.pandahook.cson). See below for more details.
  3. A git repository on your local machine, from which you will push to the hook-server.
  4. A service running somewhere on a second remote server. Our initial examples will target services running inside CoreOS clusters.

You can see a Hello World example of PandaHook usage in this repository.

Configuration Dotfile

Reusable configuration data is stored in the dotfile .pandahook.cson. This keeps you from having to re-type the same data repeatedly into commands. Here is its layout:

# Required Hook-Server Stanza
hookServer:
  address: "user@myHookServer.com"   # This is an SSH connection, not HTTPS

# Optional Stanzas for Target Services.  We will focus on CoreOS here.
coreos:
  address: "myCoreOSCluster.com" # This is an SSH connection, not HTTPS

Sub-Commands

  • build Generates a githook script
  • create Clones a remote, bare repo on the hook-server
  • destroy Deletes a remote repo from the hook-server
  • push Adds the specified githook script to remote repo on the hook-server
  • rm Deletes the specifed githook script from the remote repo on the hook-server

Build Sub-Command

The build sub-command encapsulates script generation functionality and is the most sophisticated. The goal is to abstract some the more common actions you would perform with a githook, and then separate out unique command dependencies into modules with their own code and documentation.

At the moment, we're just starting with the CoreOS dependency fleetctl and a script that produces "restart" githooks that facilitate continuous integration.

Keywords

FAQs

Package last updated on 04 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc