{"id":23074871,"url":"https://github.com/plapadoo/matrix-gitlab-bot","last_synced_at":"2026-04-28T20:06:22.674Z","repository":{"id":144422004,"uuid":"124243593","full_name":"plapadoo/matrix-gitlab-bot","owner":"plapadoo","description":"Listen for gitlab events (commits, issues, ...) and post them to matrix.org rooms","archived":false,"fork":false,"pushed_at":"2019-08-12T08:18:29.000Z","size":197,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-09T01:17:46.638Z","etag":null,"topics":["automation","bot","gitlab","haskell","http","matrix","riot-web"],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plapadoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-07T13:56:27.000Z","updated_at":"2021-08-11T13:27:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"5c40b379-c984-4755-8f93-625db3e2b377","html_url":"https://github.com/plapadoo/matrix-gitlab-bot","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plapadoo%2Fmatrix-gitlab-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plapadoo%2Fmatrix-gitlab-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plapadoo%2Fmatrix-gitlab-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plapadoo%2Fmatrix-gitlab-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plapadoo","download_url":"https://codeload.github.com/plapadoo/matrix-gitlab-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246998155,"owners_count":20866691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","bot","gitlab","haskell","http","matrix","riot-web"],"created_at":"2024-12-16T08:29:46.398Z","updated_at":"2026-04-28T20:06:22.254Z","avatar_url":"https://github.com/plapadoo.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# matrix-gitlab\n\n[![Build Status](https://travis-ci.org/plapadoo/matrix-gitlab-bot.svg?branch=master)](https://travis-ci.org/plapadoo/matrix-gitlab-bot)\n\nThis bot listens for [GitLab](https://gitlab.com) web hooks and uses the [matrix.org relay bot](https://github.com/plapadoo/matrix-bot) to post the events to [matrix.org](https://matrix.org) rooms of your choice. Using the bot, you get notified of push events, CI pipeline stati, and so on.\n\n![How matrix-gitlab-bot works](./docs/overview.png)\n\n![Push, build, … fail?](./docs/riot_push.png)\n\n## Installation\n\n### Via Docker\n\nThe easiest way to install the bot (or just try it out) is via Docker. Just pull the docker image via\n\n    docker run -v ./docs:/etc/matrix-bot:ro -p 1338:1338 -d plapadoo/matrix-gitlab-bot\n\nThis will pull the official image from [Docker Hub](https://hub.docker.com/r/plapadoo/matrix-gitlab-bot/) and start the container, thus starting the bot. This will fail unless you fill the configuration directory with some sensible configuration files. The bot needs to know where to find your matrix-bot. Also, there’s a file that contains pairs of “GitLab repository name” and “matrix.org room to notify”. Both the bot URL and the “repomapping” file are configured in the matrix-gitlab-bot.dhall file. The repository contains a sample config file in the `docs/` directory.\n\n### Manually\n\nAssuming you have compiled the bot yourself, you’re left with a single executable file:  `matrix-gitlab-bot-exe`. Without command line arguments, the bot assumes that there’s a configuration file in `/etc/matrix-bot/matrix-gitlab-bot.dhall`, though you can override this using `--config-file` on the command line.\n\n## Compilation from source\n\n### Using Nix\n\nThe easiest way to compile the bot or the docker image from source is to use the [nix package manager](https://nixos.org/nix/). With it, you can build the bot using\n\n    nix-build\n\nThe resulting files will be located in the `result/` directory. To build the Docker image, use\n\n    nix-build dockerimage.nix\n\nThis will, at the last line, output a path that you can feed into `docker load`.\n\n### Using cabal\n\nThe bot can be compiled using [cabal-install](https://www.haskell.org/cabal/) by using `cabal install --only-dependencies` and then `cabal install`.\n\n## Configuration\n\nThe bot has two configuration files, both written in the [dhall configuration language](https://github.com/dhall-lang/dhall-lang/blob/master/README.md). The format should be self-explanatory. Check out [docs/matrix-gitlab-bot.dhall](docs/matrix-gitlab-bot.dhall) for a sample configuration.\n\nThe “repo mapping” configuration file is read each time a web hook request from GitLab. This means you can add a new web hook and configure a room for it without restarting the bot (see below).\n\n## Usage\n\nThe bot listens on a HTTP port (specified in `listenPort` in the main configuration file). You have to tell Gitlab to post events to that URL. To do that, go to your project’s settings, then to “Integrations”:\n\n![Integrations](./docs/integrations.png)\n\nIn the resulting screen, on the very top, there’s a section on “Webhooks”. Enter the URL of the matrix-gitlab-bot and the events you want to pass to it. Then click on “Add webhook”. Note that if you’re using the Docker image, make sure both the bot and GitLab can talk to each other – for example, by placing them in the same Docker network.\n\n![Integrations](./docs/webhooks.png)\n\nAlso, for gitlab versions greater than 10.5.6, you have to enable the checkbox “Allow requests to the local network from hooks and services” in the admin settings, see [this bug reqport](https://gitlab.com/gitlab-org/omnibus-gitlab/issues/3307#note_64245578) for more information.\n\nNext, you have to edit your `matrix-bot-repomapping.dhall` and add a new section like this:\n\n    {\n        repo = \"gitlab-matrix-bot-test-repo\"\n      , room = \"!EGRmFUjzhLyGZapmhn:mydomain.com\"\n    }\n\t\nFor `repo`, you enter the project name that you see in GitLab. The `room` parameter specifies the *internal room number* from `matrix.org`. You can query the internal room number by pressing the gear icon on the top left in a room and then scrolling all the way down.\n\n![Integrations](./docs/gear.png)\n\nTo test if it works, click the “Test” button in the GitLab webhooks GUI. If it doesn’t work, `docker logs` or the standard error output can hopefully tell you why.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplapadoo%2Fmatrix-gitlab-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplapadoo%2Fmatrix-gitlab-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplapadoo%2Fmatrix-gitlab-bot/lists"}