Gitlab Telegram Bot
This a webhook server for Gitlab webhook events. It sends important notification to the telegram chat/group/forum.
First, install the latest version using Go's intuitive tool.
go install github.com/amirsalarsafaei/[email protected]
There is 2 ways to give program config:
- create a
notifier-config.yaml
in home directory of your os. - using environment variables.
yaml config
secret: somesecret
telegram:
token: your-telegram-bot-token
chat_id: the-chat-id(number)
thread_id: thread-id(number)
env config
SECRET=somesecret
TELEGRAM_TOKEN=your-telegram-bot-token
TELEGRAM_CHAT_ID=the-chat-id(number)
TELEGRAM_THREAD_ID=thread-id(number)
- Create a bot in telegram using
bot father
and usinggetUpdates
method in telegram api doc find out the chat id you want the bot to send notifications to. - Run this program
Gitlab-Tele-Bot serve 8080
(you can change the port as you please) on your vps. - Add the IP or URL(if you use nginx to put server behind a domain) to GitLab webhooks
In the current state, we only support merged merge request events!