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.
Prerequisites
Before proceeding, ensure the following prerequisites are met:
- Install MindsDB locally via Docker or Docker Desktop.
- To connect GitLab to MindsDB, install the required dependencies following this instruction.
- Install or ensure access to GitLab.
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:
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.