Skip to main content

Hookshot

Hookshot bridges Matrix to development tools: GitHub, GitLab, JIRA, webhooks, and more. It's the go-to solution for DevOps and development team chat integration.

Why Hookshot?

  • Bidirectional - Not just notifications, but commands back to Git
  • E2EE Support - Works in encrypted rooms (stable since 2025)
  • Widget UI - Configure without commands
  • Self-hostable - Full control over your data
  • Active development - Node 24 support, Matrix v12 rooms

Features

IntegrationReceive EventsSend Commands
GitHubIssues, PRs, commits, releases, workflowsCreate issues, assign, close, run workflows
GitLabIssues, MRs, pipelinesCreate issues, manage MRs
JIRAIssues, transitionsCreate/update issues
Generic WebhooksAny JSON payload
RSS/AtomFeed updates
FigmaComments, updates
OpenProjectWork packagesCreate/manage items

Installation

Docker

docker-compose.yml
version: '3'
services:
hookshot:
image: halfshot/matrix-hookshot:latest
restart: unless-stopped
ports:
- "9000:9000" # Webhooks
- "9001:9001" # Metrics
- "9002:9002" # Widgets
volumes:
- ./hookshot-data:/data

Configuration

config.yml
bridge:
domain: example.com
url: https://matrix.example.com
mediaUrl: https://matrix.example.com
port: 9000
bindAddress: 0.0.0.0

github:
auth:
id: YOUR_GITHUB_APP_ID
privateKeyFile: /data/github-key.pem

gitlab:
instances:
gitlab.com:
url: https://gitlab.com

jira:
webhook:
secret: your-webhook-secret

generic:
enabled: true
urlPrefix: https://hookshot.example.com/webhook

feeds:
enabled: true
pollIntervalSeconds: 300

passFile: /data/passkey.pem

Generate Registration

docker run --rm -v $(pwd)/hookshot-data:/data \
halfshot/matrix-hookshot:latest \
node config/config.schema.json > registration.yml

GitHub Setup

1. Create GitHub App

  1. Go to GitHub Settings → Developer settings → GitHub Apps
  2. Create new app with these settings:

Basic:

  • App name: Matrix Hookshot
  • Homepage URL: Your Matrix server URL
  • Webhook URL: https://hookshot.example.com/github
  • Webhook secret: Generate a strong secret

Permissions (Repository):

PermissionAccess
ActionsRead
ContentsRead
DiscussionsRead & Write
IssuesRead & Write
MetadataRead
ProjectsRead & Write
Pull requestsRead & Write

Subscribe to events:

  • Issues, Issue comments
  • Pull requests, PR reviews, PR comments
  • Push, Releases
  • Workflow runs
  • Discussions
  1. Download the private key after creation

2. Configure Hookshot

config.yml
github:
auth:
id: 12345
privateKeyFile: /data/github-key.pem
webhook:
secret: your-webhook-secret
defaultOptions:
showIssueRoomLink: true
# Optional: GitHub Enterprise
# enterpriseUrl: https://github.mycompany.com

3. Connect Repository

In a Matrix room:

!hookshot github repo https://github.com/owner/repo

GitHub Commands Reference

The default command prefix is !gh. All commands work in rooms with a connected repository.

Issue Management:

# Create new issue
!gh create "Bug: Login button broken"
!gh create "Feature request" --label enhancement

# View issue details
!gh issue 123

# Close issue
!gh close 123

# Assign issue
!gh assign 123 @username

Pull Request Commands:

# List open PRs
!gh prs

# View PR details
!gh pr 456

# Approve PR (if you have permission)
!gh approve 456

Workflow Commands:

# Run a GitHub Actions workflow
!gh workflow run deploy.yml

# Run with inputs
!gh workflow run deploy.yml --input environment=production

Repository Info:

# Show connected repo info
!gh repo

# List recent commits
!gh commits

Event Notifications

Configure which events to receive per-room:

EventDescription
issue.createdNew issues
issue.changedIssue updates
issue.editedIssue edits
issue.labeledLabel changes
pull_request.openedNew PRs
pull_request.reviewedPR reviews
pull_request.mergedPR merges
pull_request.closedPR closures
pull_request.ready_for_reviewDraft → Ready
pushNew commits
releaseNew releases
workflow.run.successCI passed
workflow.run.failureCI failed
workflow.run.cancelledCI cancelled

GitLab Setup

gitlab:
instances:
gitlab.com:
url: https://gitlab.com
self-hosted:
url: https://gitlab.example.com

Connect in room:

!hookshot gitlab repo https://gitlab.com/owner/repo

JIRA Setup

jira:
webhook:
secret: your-jira-secret
oauth:
client_id: your-client-id
client_secret: your-client-secret

Connect project:

!hookshot jira project PROJ

Generic Webhooks

Receive webhooks from any service:

Create Webhook

!hookshot webhook new MyService

Hookshot provides a URL like:

https://hookshot.example.com/webhook/abc123

Message Templates

Customize how webhooks appear:

!hookshot webhook template MyService "New event: {{data.message}}"

RSS Feeds

Subscribe to any RSS/Atom feed:

!hookshot feed add https://blog.example.com/feed.xml

Commands:

CommandDescription
!hookshot feed add <url>Subscribe to feed
!hookshot feed remove <url>Unsubscribe
!hookshot feed listList subscriptions

Commands Reference

General

CommandDescription
!hookshot helpShow help
!hookshot setupInitial setup

GitHub

CommandDescription
!hookshot github repo <url>Connect repo
!hookshot github issue <num>Show issue
!hookshot github create issueCreate issue

GitLab

CommandDescription
!hookshot gitlab repo <url>Connect repo
!hookshot gitlab issue <num>Show issue

Widgets

Hookshot provides widgets for Element:

widgets:
enabled: true
port: 9002
addToRooms: true

Access configuration via Element's integrations panel.

Troubleshooting

Webhooks Not Arriving

  1. Check webhook URL is accessible
  2. Verify secrets match
  3. Check GitHub/GitLab webhook logs
  4. Review Hookshot logs

Can't Connect Repo

  • Verify GitHub App is installed on repo
  • Check permissions
  • Ensure bot is in room

GitHub Actions Integration

Send workflow notifications directly to Matrix without Hookshot using GitHub Actions.

Matrix Notify Action

The matrix-notify-action sends workflow status with per-job reactions.

.github/workflows/ci.yml
name: CI

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm test

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm run lint

# This job runs last and reports all results
notify:
if: always()
runs-on: ubuntu-latest
needs: [build, test]
steps:
- uses: Cadair/matrix-notify-action@main
with:
matrix_token: ${{ secrets.MATRIX_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
homeserver: 'https://matrix.org'
roomid: '!yourRoomId:matrix.org'
# Optional: ignore certain jobs
ignore_pattern: '.*notify.*'
# Optional: summarize successes
summarise_success: true

What it sends:

  • Overall workflow status (✅/❌)
  • Reactions for each job status
  • Links to workflow run

Simple Matrix Message Action

For simpler notifications:

.github/workflows/notify.yml
- name: Notify Matrix
uses: s3krit/matrix-message-action@v1
with:
homeserver: matrix.org
token: ${{ secrets.MATRIX_TOKEN }}
channel: '!roomId:matrix.org'
message: |
**Build ${{ github.run_number }}** on `${{ github.ref_name }}`
Status: ${{ job.status }}
[View Run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})

Get Your Matrix Token

  1. Log into Element Web
  2. Settings → Help & About → Access Token (click to reveal)
  3. Add as MATRIX_TOKEN secret in GitHub repo settings

Get Room ID

  1. In Element, open room settings
  2. Advanced → Internal room ID
  3. Format: !randomChars:server.org

CI/CD Best Practices

Notification Strategy

EventNotify?Why
PR openedTeam awareness
PR mergedDeploy tracking
Main build failedCritical
Branch build failed⚠️Only author
DeploymentOps awareness
Security scanAlways

Separate Rooms

#ci-builds:server      - All builds (high volume)
#ci-failures:server - Failures only (alerts)
#deployments:server - Production deploys
#security:server - Security scan results

Filtering Noise

GitHub-side:

  • Use branch filters in workflow triggers
  • Don't notify on every commit, only PRs/main

Hookshot-side:

  • Configure event types per room
  • Use webhook templates to filter

Resources


Next: Building Bots