GitLab

Connects workspaces to GitLab projects. Works with both GitLab.com and a self-managed instance.

Connecting

Go to Settings → Version control → GitLab and provide two things:

  • Hostgitlab.com, or your own instance's hostname
  • Access token — a group or personal access token with the api scope

The token is stored encrypted, and is validated against the host before the connection is saved.

Use a group access token rather than a personal one where you can. A personal token carries one person's access and stops working when they leave or lose permissions, while a group token belongs to the group itself.

You can connect more than one host, so a GitLab.com connection and a self-managed connection can coexist in the same enterprise.

What you get

  • Repository access to list, connect, and create projects
  • Two-way sync between the workspace and GitLab
  • Merge request support to create, comment on, and merge merge requests
  • Compliance checks posted back to merge requests

Subgroups are supported. A project's full path, including every subgroup, is what gets stored, so group/subgroup/project connects correctly.

If a connection stops working

The connection shows as no longer valid. Remove it and connect again with a new token.

The usual cause is token expiry. GitLab requires an expiry date on access tokens, so a connection needs its token replaced periodically. Set a calendar reminder ahead of the expiry date, because the connection stops working the moment the token lapses.