feat: GitLab merge request review support#364
Merged
backnotprop merged 3 commits intomainfrom Mar 22, 2026
Merged
Conversation
Add full GitLab MR review parity with existing GitHub PR review: - Auto-detect platform from URL (github.com vs any GitLab host) - Extract GitHub logic into pr-github.ts, new pr-gitlab.ts implementation - Widen PRRef/PRMetadata to discriminated unions for type safety - Dispatch functions route to correct platform implementation - Platform-aware UI labels (PR/MR, #/!, GitHub/GitLab icons) - Self-hosted GitLab support via --hostname flag - Normalize glab diff output to standard git format - Handle glab CLI differences (no --jq, Content-Type header for --input) - Defensive JSON parsing for GitLab context API responses Tested against gitlab.com with inline comments, multi-line ranges, approval, and PR context tabs (summary, comments, checks). For provenance purposes, this commit was AI assisted.
- Map GitLab job statuses to UI-expected enums (failed→FAILURE, canceled→NEUTRAL) - Map GitLab detailed_merge_status to CLEAN/BLOCKED/BEHIND/DIRTY/UNKNOWN - Fix false approval state on repos without required approvers - Add shared encodeApiFilePath helper used by both GitHub and GitLab For provenance purposes, this commit was AI assisted.
- Use shared --panel-header-h CSS variable for consistent header heights across file tree search, file header, and annotations panel - Update GitLab icon to use official tanuki SVG paths with currentColor - Replace solid primary fill on active file tree items with 30% tinted background for better readability and semantic color preservation For provenance purposes, this commit was AI assisted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
github.comroutes togh, any/-/merge_requests/URL routes toglab--hostnameflagArchitecture
packages/shared/pr-github.tspackages/shared/pr-gitlab.tswith fullglabCLI implementationPRRef/PRMetadatato discriminated unions ("github" | "gitlab")pr-provider.tsroute by platformgetPlatformLabel,getMRLabel,getMRNumberLabel,getDisplayRepo) accept both ref and metadata typesGitLab-specific handling
glab mr diffoutputs bare diffs — normalized to standarddiff --gitformatglab apirequires explicitContent-Type: application/jsonheader for--input -glabhas no--jqflag — parse full JSON responses insteadPromise.allSettledfor partial failure resilienceFiles changed
packages/shared/pr-provider.tspackages/shared/pr-github.tspackages/shared/pr-gitlab.tspackages/server/pr.tspackages/server/review.tsapps/hook/server/index.tsapps/opencode-plugin/commands.tspackages/review-editor/App.tsxpackages/review-editor/utils/exportFeedback.tspackages/ui/components/GitLabIcon.tsxTest plan