Skip to content

feat(git): add GitLab merge request support alongside GitHub PRs - #5

Merged
tyulyukov merged 1 commit into
mainfrom
marcode/gitlab-mr-integration
Mar 28, 2026
Merged

tyulyukov merged 1 commit into
mainfrom
marcode/gitlab-mr-integration

Conversation

@tyulyukov

Copy link
Copy Markdown
Owner

Summary

  • Introduced GitHostCli service contract that abstracts git host operations (PR/MR list, view, create, checkout)
  • Implemented GitLabCli layer wrapping glab CLI alongside existing GitHubCli wrapping gh CLI
  • Created RoutingGitHostCli to auto-detect provider from remote.origin.url hostname with fallback to git config and CLI auth probing
  • Refactored GitManager to depend only on GitHostCli abstraction, removing GitHub-specific logic
  • Updated web UI components to dynamically show "PR" or "MR" labels based on detected gitHostProvider
  • Renamed GitHubCliError to GitHostCliError (GitHub-specific error) with deprecation aliases for backwards compatibility
  • Updated GitCore to support configurable refspec prefix (refs/pull for GitHub, refs/merge-requests for GitLab)
  • Gracefully defer fork-based MR workflows for GitLab with clear error messaging
  • Updated all tests to work with the abstraction layer
  • Updated AGENTS.md to document the Git Host Provider Abstraction pattern

Testing

  • GitManager tests updated to work with GitHostCliShape abstraction
  • PR listing, viewing, and creation flows tested with fake gh implementation
  • Error handling for missing CLI and authentication failures tested
  • Repository name parsing updated to handle both GitHub and GitLab URL formats
  • bun fmt, bun lint, and bun typecheck passing

- Introduce GitHostCliShape abstraction to support multiple git providers
- Implement GitLabCli layer wrapping `glab` CLI, mirror of GitHubCli
- Add RoutingGitHostCli for auto-detecting provider from remote URL
- Rename GitHubCliError → GitHostCliError with provider field
- Update GitCore to support configurable refspec prefixes (refs/pull vs refs/merge-requests)
- Web UI dynamically shows "PR" or "MR" labels based on gitHostProvider
- Defer fork-based MR workflows with graceful error
- Update AGENTS.md with provider abstraction architecture
@tyulyukov
tyulyukov merged commit e6d8546 into main Mar 28, 2026
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