Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Monitor

A self-hosted service that polls GitHub repositories and sends Discord notifications for new commits, tags, releases, issues, pull requests, and Dependabot security alerts.

Dashboard

Alerts overview:

Alerts

Features

  • Commits — get notified on every new commit to a watched branch
  • Tags — alerts when a new tag is pushed
  • Releases — notifications for new GitHub releases
  • Issues — alerts on new open issues
  • Pull Requests — notifications for new PRs
  • Security alerts — Dependabot vulnerability alerts (optional, requires token with repo scope)
  • Web UI — built-in dashboard to manage repositories and webhooks
  • Multiple Discord webhooks — fan out notifications to several channels

Setup

1. Configure environment

cp .env.example .env

Edit .env and fill in the required values:

Variable Required Description
ADMIN_API_KEY Yes Secret key to authenticate API calls. Generate with: openssl rand -hex 32
GITHUB_TOKEN No GitHub Personal Access Token. Without it: 60 req/h. With it: 5 000 req/h. No scope needed for public repos; add repo scope for private repos or security alerts.
POLL_INTERVAL No Polling interval in seconds (default: 300)
PORT No Host port to expose the service on (default: 8000)

2. Start the service

docker compose up -d

The service will be available at http://localhost:8000.

Usage

Web UI

Open http://localhost:8000 in your browser. Enter your ADMIN_API_KEY to log in.

Login

Dashboard

Webhooks

Add a repository to monitor:

Add repository

For each repository you can independently toggle which event types to monitor (commits, tags, releases, issues, PRs, security alerts).

Add a Discord webhook:

Add webhook

REST API

All API endpoints require the X-API-Key: <ADMIN_API_KEY> header.

Method Endpoint Description
GET /repos/ List monitored repositories
POST /repos/ Add a repository
PATCH /repos/{id} Update repository settings
DELETE /repos/{id} Remove a repository
GET /repos/{id}/events Fetch recent events for a repository
GET /webhooks/ List Discord webhooks
POST /webhooks/ Add a Discord webhook
PATCH /webhooks/{id} Update a webhook
POST /webhooks/{id}/test Send a test notification
DELETE /webhooks/{id} Remove a webhook
GET /status Service status (active repos, webhooks, config)
GET /health Health check (no auth required)

Data persistence

The SQLite database is stored in ./data/monitor.db, mounted as a volume inside the container. Data survives container restarts and upgrades.

Notes

  • On first poll, the current state is recorded as a baseline — no notifications are sent for existing events.
  • Subsequent polls detect changes and send a Discord embed for each new event.
  • Security monitoring (Dependabot alerts) requires a GitHub token with the repo scope and Dependabot alerts enabled on the repository.
  • This project has been fully developed using Claude Code — deploy at your own risk.

About

GitHub repository monitor with Discord notifications — FastAPI + SQLite + Docker

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages