GitLab
In this section, we present how to connect GitLab repository to MindsDB. GitLab is a DevSecOps Platform. Data from GitLab, including issues and MRs, can be utilized within MindsDB to make relevant predictions or automate the issue/MR creation.
Connection
This handler was implemented using the python-gitlab library. python-gitlab is a Python library that wraps GitLab API.
The GitLab handler is initialized with the following parameters:
repository
: a required name of a GitLab repository to connect to.api_key
: an optional GitLab API key to use for authentication.
Here is how to connect MindsDB to a GitLab repository:
If you installed MindsDB locally via pip, you need to install all handler dependencies manually. To do so, go to the handler’s folder (mindsdb/integrations/handlers/github_handler) and run this command: pip install -r requirements.txt
.
Usage
The mindsdb_gitlab
connection contains two tables: issues
and merge_requests
.
Now, you can use this established connection to query this table as:
You can run more advanced queries to fetch specific issues in a defined order:
And the same goes for merge requests:
For more information about available actions and development plans, visit this page.