Skip to content

feat: add GitLab support#534

Draft
dataforxyz wants to merge 3 commits intoendorhq:mainfrom
dataforxyz:feat/gitlab-support
Draft

feat: add GitLab support#534
dataforxyz wants to merge 3 commits intoendorhq:mainfrom
dataforxyz:feat/gitlab-support

Conversation

@dataforxyz
Copy link
Contributor

Summary

  • Add GitLabProvider in packages/core that uses the glab CLI to fetch GitLab issues and merge requests as context, with support for nested group namespaces, system note filtering, and self-hosted instances
  • Refactor getGitHubRepoInfo in the CLI push command into a generic getRepoInfo that detects GitHub vs GitLab from the remote URL (SSH, HTTPS, SSH aliases, self-hosted)
  • Update inspect, mcp, program, and output-types to recognize GitLab alongside GitHub (labels, help text, MR URLs)
  • Add comprehensive tests for both the GitLab context provider and the repo URL parser

Test plan

  • All 431 existing CLI tests pass (24 test files)
  • New push-repo-info.test.ts covers GitHub SSH/HTTPS/alias, GitLab SSH/HTTPS/nested/self-hosted, and non-matching URLs
  • New gitlab.test.ts covers issue/MR fetching, nested namespaces, system note filtering, self-hosted instances, and error handling
  • Manual: verify rover push generates correct MR URL for a GitLab repo
  • Manual: verify rover run -c gitlab:issue/1 fetches GitLab issue context

🤖 Generated with Claude Code

@dataforxyz dataforxyz marked this pull request as draft February 24, 2026 01:38
Add GitLab issues and merge requests as first-class context sources,
mirroring the existing GitHub provider. Extract shared repo URL parsing
into `getRepoInfo` in core, unify issue input extraction across all
agents, and update CLI commands (task, push, inspect, mcp), schemas,
telemetry, and the VS Code extension to support the `gitlab` source type.

Key changes:
- New `GitLabProvider` context provider (issues + MRs via glab CLI)
- Shared `getRepoInfo()` in packages/core for GitHub/GitLab URL parsing
- Rename `extractGithubInputs` → `extractIssueInputs` across all agents
- Deprecated `--from-gitlab` flag (parallel to `--from-github`)
- Push command now shows GitLab MR creation links
- Fix: `expansionEntries` filter arrow function returning undefined
- Fix: error message in push.ts ("deleting" → "pushing")
- Fix: comment typo ("Gemini" → "Qwen" credentials check)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dataforxyz and others added 2 commits February 24, 2026 13:54
Fetch MR approvals from GitLab API to show each reviewer's approval
status (approved/pending). Gracefully falls back to names only when
the approvals API is unavailable or returns invalid data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…event editor hang

1. Restore try-catch in BaseAgent.isInstalled() so missing binaries
   return false instead of throwing an unhandled exception.

2. Replace getRepoInfo() with a local parseGitLabRepoInfo() method in
   GitLabProvider that accepts any git remote URL, matching the GitHub
   provider pattern. This restores support for self-hosted GitLab
   instances without "gitlab" in the hostname.

3. Restore GIT_EDITOR=true in Git.continueMerge() to prevent git from
   opening an interactive editor in non-interactive CLI contexts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Collaborator

@ereslibre ereslibre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR @dataforxyz!

I see that commit 2054c95 is very similar to b83b2ec, which was open before it.

This PR supersedes #516 as a whole. What is the current status? Is it draft yet @dataforxyz?

Feel free to remove the draft status if you are good with the current implementation, and we'll work towards merging it.

@ereslibre
Copy link
Collaborator

Hello @dataforxyz! It would be great to merge this, feel free to mark this PR as 'Ready for review' if you are good with its current shape and we can get it merged. Thanks!

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.

2 participants