Gitlabot – it knows everyting about your merge requests so you know too

Overview

Gitlabot – a bot which can send a notification to telegram about all merge requests in your GitLab project.

Now – it notifies only about OPEN and MERGE events

Screenshot

Quick start

  1. Clone this repo to your computer.
  2. Create .env file in the root (you can find an example at .env.example) – it defines all env variables which Gitlabot needs.
  3. Run make up – it will build and start a docker container with a bot.
  4. Run make log – it will print container log. If all is ok you will see something like this:

2022/04/01 02:31:50 Authorized on account <your_telegram_bot>
2022/04/01 02:31:50 Listen: 8088

5Add a webhook in your GitLab project. You can find the full documentation here

USAGE

  1. Start the bot
  2. If you don’t know your chat id – just add your telegram bot to a group and run make log. You will see information like this:
2022/04/01 12:44:09 Get message 'hello bot' from user 'yourName' from chat id -614353736

Notify: Env variable BOT_DEBUG must be true

Requirements

  1. Golang > 1.13.
  2. Docker.
  3. Make.
  4. External IP for a webhook.
  5. Telegram bot for sending notifications.

TODO

  • Add supporting OPEN and MERGE statuses
  • Add unit tests
  • Add CI\CD
  • Add supporting many projects at the same time
  • Add Web UI for configurating

GitHub

View Github