Repository navigation
feat(review): support GitHub Enterprise and fix self-hosted GitLab MR diffs - #460
Merged
Merged
Conversation
… diffs Add `host` field to GitHub PR types and update URL parsing to accept any host with `/pull/` pattern, enabling GitHub Enterprise Server URLs like `ghe.company.com/owner/repo/pull/123`. All 8 `gh` CLI functions now pass `--hostname` (for `gh api`/`gh auth`) and `HOST/OWNER/REPO` (for `gh pr`) when targeting non-github.com hosts. Replace broken `glab mr diff --hostname` invocation (glab mr subcommands don't support --hostname) with `glab api .../diffs` which does. Diffs are now reconstructed from structured API response instead of heuristic parsing of bare diff output. Closes #348 Closes #457 For provenance purposes, this commit was AI assisted.
Owner
Author
Code reviewFound 1 issue:
plannotator/packages/shared/pr-gitlab.ts Lines 43 to 48 in 27aa3f2 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
glab api --paginate already returns a single merged JSON array, so the regex that replaced ][ with , was unnecessary and could corrupt diff content containing array indexing patterns like arr[i][j]. For provenance purposes, this commit was AI assisted.
This was referenced Apr 1, 2026
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
hostfield to GitHub PR types, update URL parsing to accept any host with/pull/pattern (e.g.ghe.company.com/owner/repo/pull/123), and thread--hostname/HOST/OWNER/REPOthrough all 8ghCLI functionsglab mr diff --hostname(glab mr subcommands don't support--hostname) withglab api .../diffsendpoint which does, reconstructing unified patches from the structured API responseCloses #348
Closes #457
Test plan
bun test packages/shared/)plannotator review https://ghe.example.com/owner/repo/pull/Nparses and authenticatesplannotator review https://gitlab.selfhosted.com/group/project/-/merge_requests/Nfetches diff without--hostnameerror