A GitLab bot for Matrix.
Switch branches/tags
Nothing to show
Clone or download
tulir Update README
Fixes #16
Latest commit 50d1295 Nov 1, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
vendor
.gitignore
Dockerfile
Gopkg.lock
Gopkg.toml Update webhook library Sep 26, 2018
LICENSE
README.md Update README Nov 1, 2018
command-handler.go
commands.go Update go-gitlab version and fix assignee formatting Jun 20, 2018
config.go
example-config.json
gitlab-auth.go
gitlab-webhook.go
matrix.go
maulabbot.go Make token path configurable Jul 6, 2018

README.md

Maunium GitLab bot

A Gitlab bot for Matrix. It uses mautrix, go-playground webhooks and go-gitlab

Discussion

Matrix room: #maulabbot:maunium.net

Features

  • Spam a Matrix room using GitLab webhooks
    • Issues/merge requests
      • Comments
    • Push events
    • Tag creation
    • Pipeline events
    • Wiki page edits
  • Log in to GitLab accounts (per-user)
    • [Maybe] Allow logging in to multiple GitLab servers and add a per-room config of which server to use in that room by default.
  • Commits
    • View full commit messages
    • View commit diffs
    • View commit history
  • Issue management
    • Read issues
    • Create/close/reopen issues
    • Read comments on issues
    • Comment on issues
  • Shorter commands

Usage

Configure the bot by copying example-config.json to config.json and filling out the fields.

Docker

  1. Create a directory for the bot and cd into it.
  2. Pull the docker image with docker pull docker.io/maubot/gitlab:latest.
  3. Make a config file as described above
  4. Run the bot:
    docker run --restart unless-stopped -v `pwd`:/etc/maulabbot:z docker.io/maubot/gitlab:latest
    

Webhooks

When adding a GitLab webhook, add the internal room ID as a query string in the field room. For example, if the address + path is https://example.com/webhook, you could add https://example.com/webhook?room=!HweXqCwBqJzepVovYt:matrix.org as the webhook URL and the bot would send notifications to the room whose internal ID is !HweXqCwBqJzepVovYt:matrix.org.

Commands

You should log in with your GitLab access token, since most commands require authentication. You can log in by sending !gitlab login <access token> to the bot in a private room.

The bot only handles commands prefixed with !gitlab. Use !gitlab help for help.