Skip to main content

GitLab Issue Bot for Isochronal Heads-up Monitoring

About

This bot can be used to periodically create issues in a GitLab project. It uses an arbitrary set of issue templates and a schedule configuraiton to create matching issues.

gibihm was developed at Tecids e.V. for the scenario of managing infrastructure in a GitLab project, and the need for creating issues / to-dos for periodic maintenance tasks

The name

Man bräuchte ein Tool, in das man Templates mit Checklisten und so ’ne Art crontab schmeißt, und dann gib ihm!

In English, freely translated:

One could use a tool to throw templates with checklists and some kind of crontab at, and off it goes!

Usage

General

The bot’s configuration lives entirely inside the project the bot will be used in. To start using the bot in a project, invite the bot user to the project. The bot user is a regular GitLab user.

Add templates and a schedule configuration to your repository, as described below. You can find an example project in the example/ directory.

Defining tasks

Tasks are defined as issue templates. For every kind of tasks that has to be scheduled, a template has to be created. Ideally, the template contains a good description on what has to be done, including a checklist of action items for the task’s completion.

Scheduling tasks

The schedule is a YAML document living either at .gitlab/issue_schedule.yaml or .issue_schedule.yaml. It must contain an array of dictionaries, each containing the following keys:

Key

Description

Default

template

Base filename (without .md) of the issue template to use

title

Title for the issue to create

assignee

User name of responsible user

due

Date expression (parsable by dateparser when task is due

in one week

labels

Array of labels to assign to the created issue

confidential

Set created issue as confidential

false

schedule

A crontab-like schedule defining when the task has to be scheduled

@weekly

tag

Short tag to identify issues related to this task

Same as template

Configuration

The bot is configured through environment variables.

Variable

Description

Default

GIBIHM_API_URL

URL of GitLab v4 API endpoint

Value of CI_API_V4_URL

GIBIHM_API_TOKEN

Access Token with api and read_user scopes

Installation

You can either use the bot from a Docker image directly in GitLab CI (see below), or install it whereever you want and run it

Installing and running using pip

Installation from PyPI using pip and running is straightforward:

pip3 install gibihm

export GIBIHM_API_URL=https://gitlab.example.com
export GIBIHM_API_TOKEN=Foo_Bar_Token

gibihm

Installing and running using Docker

The bot is also available using Docker:

docker pull natureshadow/gibihm
docerk run \
    -e GIBIHM_API_URL=https://gitlab.example.com-it \
    -e GIBIHM_API_TOKEN=Foo_Bar_Token \
    natureshadow/gibihm

Running for a single project

Normally, the bot will operate on all projects its user is a member of.

You can pass it a numeric project ID using the --project-id command-line argument to run for only one project.

Running from project CI

If you do not want to use a site-wide installation, but rather add the bot to a single project, you can configure and run it directly in GitLab CI.

A minimal .gitlab-ci.yml looks like this:

schedule_issues:
  only:
    - schedules
  image: natureshadow/gibihm
  script: [ "true" ]

In your project settings. add the GIBIHM_API_TOKEN variable.

You can then use GitLab’s Pipeline schedules to periodically run the bot and schedule your issues.

Metadata

Release files for gibihm 0.1.1.post2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gibihm 0.1.1.post2
File Size Uploaded Provenance Actions
gibihm-0.1.1.post2.tar.gz 11.7 kB Without provenance Details for gibihm-0.1.1.post2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gibihm 0.1.1.post2
File Interpreter ABI Platform Actions
gibihm-0.1.1.post2-py3-none-any.whl Python 3 none any Details for gibihm-0.1.1.post2-py3-none-any.whl

Total release size: 25.8 kB

Release files / gibihm-0.1.1.post2.tar.gz

Download URL gibihm-0.1.1.post2.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8f2cf137ecfa0f2d018ed884472d28943b18e6e06697d459cace8ed118ebadfd
BLAKE2b-256 checksum
How to use checksums
435ef16a15a8d2be54ca95b132c23dc1bb369904e2c3077fc28876cdc6b9dd69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.6 CPython/3.9.4 Linux/4.19.0-14-amd64

Release files / gibihm-0.1.1.post2-py3-none-any.whl

Download URL gibihm-0.1.1.post2-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a2f7c083fe04152aec6b9da242c3fd12cd9748177922b7594c93dffa774ef73
BLAKE2b-256 checksum
How to use checksums
bf1a6e4d2337d8341a7cbba70fa025e23f41c14b654aaef53fc9f142c9f45e26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.6 CPython/3.9.4 Linux/4.19.0-14-amd64

Security for gibihm 0.1.1.post2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page