Skip to content

nimolix/gitlab-webhook-notifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

gitlab-webhook-notifier

Intro

Simple script for gitlab to notify team members by email after push event

Prerequisite

$ pip install requests

Configuration

Open the script and near the top you'll find the following lines:

# log file
log_file = './gitlab-notifier.log'

# gitlab installation url
gitlab_url = 'http://gitlab.local'

# api access token, get it from your profile page in gitlab
gitlab_token = ''

# smtp host, defaults to 'localhost'
smtp_host = 'localhost'

# smtp username, leave it empty if you're submitting to localhost
smtp_user = ''

# smtp password, leave it empty if you're submitting to localhost
smtp_pass = ''

# from part of the mail
mail_from = 'gitlab@gitlab.local'

# bind the notifier to this port
bind_port = 8000

# when rotate log file
log_max_size = 5 * pow(2, 20)         # 5MB

# verbosity level
log_level = logging.INFO

Fire up a tmux/screen session and execute the script

Setup your project in gitlab accordingly!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages