Posts a formatted message to a Haven channel when GitHub issues are opened, closed, or reopened (configurable).
Listens for GitHub issues webhook events, verifies X-Hub-Signature-256 HMAC (same pattern as github-releases), and posts a short card (repo, number, title, link, labels, optional body).
🆕 Issue opened: owner/repo#42
**Login button broken on mobile**
https://github.com/owner/repo/issues/42
_Author: @alice_
Labels: `bug` `mobile`
Steps to reproduce…
In your Haven server: Settings → Server Admin Settings → Bots, create a bot in the channel that should receive issue posts, and copy the full Webhook URL.
openssl rand -hex 32Use the same value in GitHub and in GITHUB_WEBHOOK_SECRET.
git clone https://github.com/ancsemi/haven-community.git
cd haven-community/bots/github-issues
npm install
cp .env.example .env
# edit .env
node --env-file=.env server.jsThis needs Node 20.6 or newer, which loads .env through --env-file.
In the GitHub repo (or org):
- Settings → Webhooks → Add webhook
- Payload URL:
https://your-bot-host.tld/github - Content type:
application/json - Secret: same as
GITHUB_WEBHOOK_SECRET - Events: “Let me select individual events” → tick Issues only
- Save, then check Recent Deliveries for a
200on the ping
| Variable | Required | Description |
|---|---|---|
HAVEN_WEBHOOK_URL |
yes | Full Haven bot webhook URL |
GITHUB_WEBHOOK_SECRET |
yes | Shared secret; verifies X-Hub-Signature-256 |
HAVEN_USERNAME |
no | Display name override |
HAVEN_AVATAR_URL |
no | Avatar override |
REPO_FILTER |
no | If set, only this owner/repo |
ACTIONS |
no | Comma list (default opened,closed,reopened). Also supports e.g. labeled, assigned, edited |
IGNORE_PRS |
no | true (default) skips issue events that are pull requests |
BODY_MAX_CHARS |
no | Body snippet length (default 800; 0 = omit truncation but still length-capped in message) |
PORT |
no | HTTP port (default 3000) |
- Verifies HMAC over the raw body before JSON parse.
- Ignores non-
issuesevents (exceptping). - Default actions: opened / closed / reopened.
- Body text is included for opened/reopened/edited only.
MIT. See the repo root LICENSE.