Gitlab-Tele-Bot

command module
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

README

Gitlab-Tele-Bot

Gitlab Telegram Bot

This a webhook server for Gitlab webhook events. It sends important notification to the telegram chat/group/forum.

sample

How To Use

First, install the latest version using Go's intuitive tool.

go install github.com/amirsalarsafaei/[email protected]
Config

There is 2 ways to give program config:

  • create a notifier-config.yaml in home directory of your os.
  • using environment variables.
Example config

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)
How to setup
  • Create a bot in telegram using bot father and using getUpdates 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
Current state

In the current state, we only support merged merge request events!

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
run
internal
git
pkg
mux

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL