Skip to main content

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: example-group/example-project
      title: Check the yard
      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

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file python3_cyberfusion_work_item_automations-1.0.tar.gz.

File metadata

File hashes

Hashes for python3_cyberfusion_work_item_automations-1.0.tar.gz
Algorithm Hash digest
SHA256 5c81ab82481d658530a7a9bf0b0bbdb14f199df624d312be40ea9af0eae30aeb
MD5 6b8b91ba006fd578b0a7c9ac413d83ba
BLAKE2b-256 3399addb5478097a3609a440c9c23badd7d1985b5f916a0ab88a0c5fee40796b

See more details on using hashes here.

File details

Details for the file python3_cyberfusion_work_item_automations-1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for python3_cyberfusion_work_item_automations-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ab67d21f03d427da9d87de7994f0758c7663783edae220dd050da387a66edadc
MD5 b0295613190538deddd1c2268dce2141
BLAKE2b-256 811f01d2e4fa849b3ac819fd5931752535ac663a925d2df688e9e4141988747f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page