GitLab
The RegScale GitLab integration is a command-line interface (CLI) tool that allows you to synchronize issues from a GitLab project into a RegScale module. This document provides a guide on how to use the CLI command for this integration.
Command Structure
The main command for this integration is sync_issues
. Here's the structure of the command:
regscale gitlab sync_issues --regscale_id <id> --regscale_module <module> --gitlab_url <url> --gitlab_project_id <id> --api_token <token> [--include_links]
Command Options
The sync_issues
command accepts the following options:
--regscale_id <id>
: The ID of the RegScale module where the issues will be synchronized.--regscale_module <module>
: The name of the RegScale module where the issues will be synchronized.--gitlab_url <url>
: The URL of the GitLab instance. The default ishttps://gitlab.com
.--gitlab_project_id <id>
: The ID of the GitLab project from which the issues will be pulled. This can also be set via theGITLAB_PROJECT
environment variable.--api_token <token>
: Your GitLab API token with API read access. This can also be set via theGITLAB_API_TOKEN
environment variable.--include_links
: A flag that, when set, includes links from the issue description. This is optional and is not set by default.
Example Usage
Here's an example of how to use the sync_issues
command:
regscale gitlab sync_issues --regscale_id 123 --regscale_module "securityplans" --gitlab_url "https://gitlab.example.com" --gitlab_project_id 456 --api_token "your-api-token" --include_links
This command will synchronize issues from the GitLab project with ID 456
at https://gitlab.example.com
into the securityplans
module of the RegScale instance with ID 123
. The command will also include links from the issue description.
Note
Please ensure that your GitLab API token has API read access. Also, make sure that the RegScale ID and module name are correct. The synchronization process will fail if any of these details are incorrect.
Updated about 1 year ago