GitLab¶
GitHub PRs work out of the box via gh. GitLab MRs
(namespace/repo!123 or an MR URL; namespace may contain slashes for
subgroups) need one of the following, in priority order:
- A token entered in the browser — when a GitLab ref needs auth, the UI
prompts for a personal access token and persists it (mode
0600) in the state directory. Since this is an explicit, deliberate choice, it takes precedence even ifglabis also installed and authenticated. -
glabinstalled — used when no browser token is set; if the binary is present, every GitLab call goes through it.Warning
This is a presence check (
glab --version), not an auth check: an installed-but-unauthenticatedglabis still selected, soGITLAB_TOKENbelow is not reached as a fallback in that case. Enter a browser token to override. -
GITLAB_TOKENin the environment — used by the built-in REST fallback when neither of the above is available.
| Variable | Description |
|---|---|
GITLAB_TOKEN |
Personal/project access token with API scope, used by the REST fallback when glab isn't available |
GITLAB_HOST |
Self-hosted GitLab instance (default: gitlab.com) |
See Submitting a review for how GitLab submission differs from GitHub (per-comment discussions with retry and resume, instead of one atomic review).