Allow argus-server to create tickets in Gitlab
Project description
argus_ticket_gitlab
This is a plugin to create tickets in Gitlab from Argus
Settings
-
TICKET_PLUGIN
:"argus_ticket_gitlab.GitlabPlugin"
-
TICKET_ENDPOINT
:"https://gitlab.com/"
or link to self-hosted instance, absolute URL -
TICKET_AUTHENTICATION_SECRET
: Create a project access token or a personal access token with the scopeapi
:{ "token": token }
It is recommended to create a Gitlab API user and to ensure that that user has the necessary authorization for creating issues in the relevant repository.
-
TICKET_INFORMATION
:Project namespace and name (obligatory)
{ "project_namespace_and_name": project_namespace_and_name }
To know which project to create the ticket in the Gitlab API needs to know the owner and name of it.
To figure out the namespace visit the namespace page of the Gitlab documentation. The name is the name of the Gitlab project.
For the Github project Simple Maven Example the dictionary would look like this:
{ "project_namespace_and_name": "gitlab-examples/maven/simple-maven-example", }
Labels (optional)
There are two ways of automatically filling labels:
-
Labels that are always the same, independent of the incident. These will be set in
labels_set
.{ "labels_set" : [ label1, label2, label3, ] }
-
Labels that are filled by attributes of the Argus incident. These are set in
labels_mapping
which is a list of the names of the attributes as they are returned by the API (e.g.start_time
). If the information can be found in the tags the it has to be a dictionary withtag
as the key and the name of the tag as the value (e.g. {"tag": "host"}).{ "labels_mapping" : [ attribute_of_incident, {"tag": name_of_tag}, ] }
-
Code style
argus_ticket_gitlab uses black as a source code formatter. Black can be installed by running
$ pip install black
A pre-commit hook will format new code automatically before committing. To enable this pre-commit hook, run
$ pre-commit install
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for argus_ticket_gitlab-1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 323bddb829c9b48ef2bb2a116f3dc70532d72162710038ef7a55f14a3e6b7a9a |
|
MD5 | 7be8e4cf89d41806ac0c1d80958052ec |
|
BLAKE2b-256 | ae0c2f31a5cc8e052dacde8f69de02b71c39c48d7f19e08569857a626b566e23 |