GitLab - Examples
The list of options and some examples for GitLab
The following options are available for the snyk-scm-contributors-count gitlab
command:
Before running the command
Get your GitLab token or create a new one with this guide.
Note: Make sure your token has read access to the repos.
Running the command
Consider the following levels of usage and options:
Usage levels
To get commits for all groups and their projects in GitLab, provide the GitLab token (and server url for GitLab Enterprise):
To get commits for some groups and their projects in GitLab, provide the GitLab token and the group names, separated by a comma:
Note that for nested groups, you need to provide the lowest level group name, for example, for TopLevelGroup/MidLevelGroup/LowLevelGroup
provide only "LowLevelGroup" with the --groups
flag
To get commits for a specific project in GitLab, provide the GitLab token and one group name and one project name:
Options
To exclude some contributors from being counted in the commits, add an exclusion file with the emails to ignore(separated by a new line) and apply the
--exclusionFilePath
with the path to that file:
To set the output to json format, add the
--json
flag:To run in debug mode for verbose output, prefix with
DEBUG=snyk*
:
Last updated