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
Quick start
- Clone this repo to your computer.
- Create
.env
file in the root (you can find an example at.env.example
) – it defines all env variables which Gitlabot needs. - Run
make up
– it will build and start a docker container with a bot. - 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
- Start the bot
- 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
- Golang > 1.13.
- Docker.
- Make.
- External IP for a webhook.
- 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