Skip to content

Add GitLab merge request support via glab CLI#17

Open
benthomasson wants to merge 2 commits into
mainfrom
gitlab-support
Open

Add GitLab merge request support via glab CLI#17
benthomasson wants to merge 2 commits into
mainfrom
gitlab-support

Conversation

@benthomasson

Copy link
Copy Markdown
Owner

Summary

  • Auto-detect GitHub vs GitLab from PR/MR URLs, GITLAB_HOST env var, or git remote
  • Add GitLab implementations using glab CLI (glab mr diff, glab mr note, glab mr view, glab issue view)
  • All existing public API functions dispatch internally — CLI layer needs no functional changes, just help text updates
  • 49 new tests covering platform detection, URL parsing (including nested GitLab groups and self-hosted instances), and dispatch routing

Test plan

  • All 276 existing tests pass (zero regressions)
  • 49 new tests pass covering:
    • detect_platform() for GitHub URLs, GitLab URLs, self-hosted GitLab, bare numbers
    • GitHub and GitLab URL parsing (PRs, MRs, issues)
    • Dispatch routing for get_pr_diff, post_pr_comment, fetch_pr_locally, get_github_issue
    • pr_output_dir_name with pr- vs mr- prefix
  • Manual smoke test with a real GitLab MR (requires glab configured)

🤖 Generated with Claude Code

benthomasson and others added 2 commits June 26, 2026 11:34
Auto-detect GitHub vs GitLab from PR/MR URLs, GITLAB_HOST env var, or
git remote. All existing public API functions (get_pr_diff,
post_pr_comment, fetch_pr_locally, etc.) dispatch internally so the CLI
layer needs no functional changes.

Co-Authored-By: Claude <noreply@anthropic.com>
- Assert return values in FetchPrLocallyDispatch and GetIssueDispatch tests
- Add test_invalid_raises for _parse_gitlab_issue_url

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant