GitLab Snap Pack

Overview

GitLab is a DevSecOps platform for source code management, issue tracking, and CI/CD. The GitLab Snap Pack connects to GitLab.com or to a GitLab Self-Managed instance through the GitLab REST API and contains the following Snaps:
  • GitLab - Read: Reads projects, groups, issues, merge requests, epics, repository content, CI/CD objects, packages, users, and other GitLab resources, and downloads archives, raw files, job artifacts, and job logs.
  • GitLab - Search: Searches GitLab for projects, issues, merge requests, milestones, epics, users, snippet titles, code (blobs), commits, notes, and wiki content across the instance, a group, or a project.

Both Snaps are read-only. The Repository Content resource of the GitLab - Read Snap reads repository files with project and path metadata for knowledge base ingestion.

Prerequisites

  • A GitLab.com account or an account on a GitLab Self-Managed instance that can access the projects and groups you intend to read.
  • One of the following credentials, depending on the account type you use:
  • Network access from the Snaplex to the GitLab instance.

Supported versions

The Snaps call GitLab REST API v4 by default. You can change the version in the API version field of the account.

GitLab.com and GitLab Self-Managed

The Snaps work the same way against GitLab.com and against a GitLab Self-Managed instance, but the account configuration, the network path, and the features available to the Snaps differ. Review the following table before you configure an account.

Area GitLab.com GitLab Self-Managed
GitLab URL Keep the default value https://gitlab.com. Enter the URL of your instance, including any relative URL path, for example https://git.example.com or https://example.com/gitlab. A bare host name is accepted and taken as HTTPS. The Snaps do not follow redirects, so enter the final address of the instance.
OAuth application Register the application on GitLab.com. Keep the default authorization and token endpoints. Register the application on your instance and point both the OAuth2 authorization endpoint and the OAuth2 token endpoint at the instance. An application registered on GitLab.com does not work with a Self-Managed instance.
Network GitLab.com is reachable over the internet from Cloudplexes and Groundplexes. Instances on a private network are usually reachable only from a Groundplex in the same network. Otherwise, allow the egress IP addresses of the Snaplex in your firewall. The Snaps use the proxy settings configured on the Snaplex.
TLS certificates GitLab.com uses a publicly trusted certificate. No action is needed. If the instance uses an internal or self-signed certificate, import the CA certificate into the trust store of the Snaplex JVM. Use Ignore certificate errors in the account only for testing.
Rate limits When GitLab.com returns HTTP 429, the Snaps wait for the time in the Retry-After header and retry, up to the Number of retries of the Snap. The Snaps handle HTTP 429 the same way. The limits depend on the configuration of your instance.
Search Searching blobs, commits, notes, and wiki blobs across a group or the instance requires advanced search to be available for the namespace. Searches within a project work without it. The same searches require advanced search to be enabled on the instance. Searches within a project work without it.
Instance-wide reads

Reading Projects, Groups, or Users without a project or group returns public objects from all of GitLab.com. Narrow the read for each resource:

  • Projects: Set a group, or add the membership or owned filter with the value true.
  • Groups: Set a group to read its subgroups, or add the owned or min_access_level filter.
  • Users: The project and group fields do not apply. To read the users of a project or group, select Members instead.
Reading without a project or group returns the objects of your instance that the token can access. The same per-resource guidance applies.
GitLab version and tier Epics and iterations require Premium; child epics and related epics require Ultimate. Features depend on the version and tier of your instance. For example, the Metadata resource requires GitLab 15.2 or later.

Learn more: GitLab REST API, GitLab.com settings and rate limits.