[FEATURE] Create PR button should support GitLab and other Git platforms

Status Fixed / completed
Maintainer reply None cached
Activity 3 comments · opened Apr 14, 2026 · closed Apr 14, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Summary

The built-in "Create PR" button in Claude Code is hardcoded to use GitHub (gh CLI). Projects hosted on GitLab (or other platforms like Bitbucket) cannot use this feature, even when CLAUDE.md explicitly instructs to use GitLab MCP tools for merge requests.

Current Behavior

  • The "Create PR" button always attempts to create a GitHub Pull Request
  • Projects using GitLab must rely on MCP tools (mcp__GitLab__create_merge_request) as a workaround
  • The CLAUDE.md instruction to use GitLab is ignored by the built-in UI action

Proposed Solution

Expected Behavior

The "Create PR" feature should be platform-agnostic:

  1. Auto-detect the Git remote platform from the repository's origin URL
  2. Route to the appropriate tool — gh for GitHub, GitLab MCP/API for GitLab, etc.
  3. Respect project-level configuration — if CLAUDE.md specifies a preferred platform/tool for MRs, honor that

Suggested Approaches

  • Parse git remote get-url origin to detect the platform
  • Allow a configuration option in CLAUDE.md or .claude/settings.json to specify the MR/PR creation method
  • Fall back to the current GitHub behavior when no other platform is detected

Alternative Solutions

Alternatively use the configured MCP servers with the respective tools?

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

_No response_

Additional Context

Context

This came up in a project hosted on a self-managed GitLab instance, where the "Create PR" button was unusable and all merge requests had to be created through GitLab MCP tools manually.

Co-Created with Claude, thx for the help

View original on GitHub ↗

3 Comments

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/12346
  2. https://github.com/anthropics/claude-code/issues/22303
  3. https://github.com/anthropics/claude-code/issues/38062

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

ak-magnolia · 6 months ago

Ok agree #12346 and https://github.com/anthropics/claude-code/issues/38062 are similar.

For the the main enhancement/different would be that the integrated button, which anyhow issues commands is checking the @CLAUD.MD file to ensure it follows the tool instructions there. You may also add a +1 to the others

github-actions[bot] · 5 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.