Skip to content
This repository has been archived by the owner on Dec 26, 2020. It is now read-only.
/ gitlab-notifier Public archive

Python script informing you about GitLab builds progress with native system notifications

License

Notifications You must be signed in to change notification settings

EpocDotFr/gitlab-notifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitLab Notifier

A Python script informing you about GitLab builds progress with native system notifications.

Prerequisites

Python 3. May eventually works with Python 2 (not tested).

Installation

Clone this repo, and then the usual pip install -r requirements.txt.

Configuration

Copy the .env.example file to .env and fill in the configuration parameters.

Available configuration parameters are:

  • GITLAB_ENDPOINT Root URL to your GitLab instance
  • GITLAB_TOKEN Token used to access your GitLab instance API. You can create one in Profile Settings > Personal Access Tokens
  • POLL_INTERVAL Interval, in seconds, when the script will check for updates
  • FILTER_USERNAME A GitLab username to filter builds by (you probably don't want to be spammed by your coworkers builds) (optional)
  • FILTER_STAGE Only filter builds in this stage name (optional)

Usage

python run.py --project=4

--project is a GitLab project ID.

Best usage is to run it as a daemon or service (you probably don't want an ever-running terminal window).

How it works

This script, once started, polls the GitLab builds API of a specific project every 60 seconds (by default) indefinitely. It internally maintain a list of every builds that are in progress, thus allowing us to display native notifications when build statuses are updated.

About

Python script informing you about GitLab builds progress with native system notifications

Topics

Resources

License

Stars

Watchers

Forks

Languages