Skip to content

Repository files navigation

GitHook

GitHook is a self-hosted webhook relay dashboard for GitHub events.

Readme generated by AI

Create and manage per-user webhook endpoints, then route incoming GitHub push events (or other webhook calls) to your own custom destination URL with custom headers/body/method.

What This Project Does

  • Gives each user unique webhook endpoints.
  • Lets users create, edit, and delete hooks from a dashboard.
  • Forwards incoming requests to your configured destination endpoint.
  • Tracks successful runs and failed runs.
  • Supports optional reCAPTCHA on auth routes.
  • Includes a single-page dashboard UI built with plain JavaScript.

Features

  • User auth pages (login, register, forgot password).
  • Dashboard sections for account, hooks list, status, and hook editor.
  • Hook editor supports:
    • request method (POST/GET/PATCH/DELETE)
    • destination URL
    • custom headers
    • request body key/value pairs
  • New hook setup popup with quick GitHub webhook instructions.
  • Hook deletion with confirmation.
  • Config-based captcha enable/disable toggle.
  • Request timeout handling and friendly error pages.

Quick Start

  1. Install dependencies:
npm install
  1. Create your runtime config:
  • Copy config.json.example to config.json
  • Fill in port, cookie secret, database, domain, captcha keys, and email settings as needed.
  1. Import/create database schema:
  • Use database.sql.
  1. Start server:
node index.js

Webhook Flow

  1. Create a hook in the dashboard.
  2. Copy your generated endpoint:
https://your-domain.tld/hook/<hookId>
  1. In your GitHub repository:
  • Go to Settings -> Webhooks -> Add webhook
  • Set Payload URL to your hook endpoint
  • Set Content Type to application/json
  • Choose events (usually push)
  • Save

When GitHub sends an event to your hook endpoint, GitHook forwards it to your configured destination URL using your selected method, headers, and body, (for example to restart a webserver to pull from the repo again)

Notes

  • Email sending is not configured by default.
  • If captcha is disabled, auth routes skip captcha verification.

About

GitHook

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages