Automations for GitLab work items.
Project description
python3-cyberfusion-work-item-automations
Automations for GitLab work items (issues, PRs, etc.)
The following automations are supported:
- Create recurring issues (using cron schedule)
GitLab doesn't support workflows natively. For example, there's no built-in way to create recurring issues, or take actions on issues when something happens to a PR, etc.
For the purpose of developing GitLab itself, GitLab does provide the external tool gitlab-triage. However, it is quite limiting: for example, it doesn't allow for creating standalone, recurring issues.
Although there are plans to implement workflows for automation in GitLab itself, the timeline is unclear. Hence this project.
Install
PyPI
Run the following command to install the package from PyPI:
pip3 install python3-cyberfusion-work-item-automations
Debian
Run the following commands to build a Debian package:
mk-build-deps -i -t 'apt -o Debug::pkgProblemResolver=yes --no-install-recommends -y'
dpkg-buildpackage -us -uc
Configure
No configuration is supported.
Usage
Create config file
In its most basic form, the config file must contain the URL to your GitLab instance, and a private token (PAT).
Create the PAT according to the documentation with the api scope.
automations: []
private_token: glpat-1aVadca471A281la331L
url: https://gitlab.example.com
On Debian, add the config file to /etc/glwia.yml (used by the automatically configured cron, running automations).
In any other environment, use a path of your choosing.
Add automations
Add one or more automations to the automations key.
⚠️ Every automation must have a unique name.
Create issues
automations:
create_issue:
- name: Do something repetitive
schedule: 5 13 3 * *
# Project to create issue in. Format: # namespace/project
project: example-group/example-project
# Issue title
#
# Variables:
# - next_week_number (example: 5)
# - current_month_number (example: 1)
# - current_year (example: 2025)
title: Check the yard for month {current_month_number}-{current_year}
# Assign the issue to a member of this group
#
# Optional:
# If specified, issue is assigned to a **random** user in the specified group.
# If unspecified, the issue is not assigned to anyone.
assignee_group: best-developers
# Issue contents
description: Check stuff, do stuff, ...
Run automations
Debian
On Debian, automations are automatically run every minute (according to each automation's respective schedule).
Other environments
Run automations manually:
glwia --config-file-path /tmp/glwia.yml # Short for 'GitLab Work Item Automations'
Set --config-file-path to a path of your choosing.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python3_cyberfusion_work_item_automations-1.1.1.tar.gz.
File metadata
- Download URL: python3_cyberfusion_work_item_automations-1.1.1.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2aa410c34487c0cdb4dfe4b899a054425eb4ddfa2e4cd3104aabba02047eb98
|
|
| MD5 |
f47fe6554da19fa190ec97aa6a6502ba
|
|
| BLAKE2b-256 |
59bdc5d7df2056a72e4a83af9333955e690ab8e4c8c49f191064d03442275f80
|
File details
Details for the file python3_cyberfusion_work_item_automations-1.1.1-py3-none-any.whl.
File metadata
- Download URL: python3_cyberfusion_work_item_automations-1.1.1-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4907685060ff160b629d574e5b14d257a4f4573d7717d179fb20c31b99057d76
|
|
| MD5 |
076ee1bc246e0a0161bd3f097960dcbd
|
|
| BLAKE2b-256 |
b2629b36dc9281baf9ccce72cb490f80f812ce06574670fb993ea004db4cb2bc
|