atxtechbro / atxtechbro/dotfiles

feat: implement GitLab support for /close-issue command based on spike findings

Open
#865 4 comments 0 reactions 0 assignees View on GitHub
enhancement slash-commands
Dominant language
Shell
Stars
27
Forks
2
PR merge metrics
No merged PRs in 30d

Description

## Summary
Based on spike #859 findings, implement GitLab support for the `/close-issue` command using git remote detection to automatically route to the appropriate platform's MCP tools.

## Context
The spike (#859, PR #861) confirmed:
- GitLab MCP tools already exist in `mcp/servers/gitlab-mcp-server/`
- Git remote detection reliably identifies GitHub vs GitLab
- Zero-configuration approach aligns with OSE principle
- Implementation effort estimated at 4-6 hours

## Implementation Plan

### 1. Update `/close-issue` Command Template
Enhance `.claude/command-templates/close-issue.md` to:
- Detect platform from git remote URL
- Route to appropriate MCP tools (GitHub vs GitLab)
- Support optional additional prompt argument (addresses #858)

### 2. Platform Detection Logic
```python
# Pseudo-code from spike prototype
def detect_platform():
# Check git remote get-url origin
# Parse URL to identify platform
# Fall back to GitHub if unclear
return platform, owner, repo
```

### 3. Tool Routing
- GitHub: Use existing `mcp__github-*` tools
- GitLab: Use existing `gitlab_*` tools from MCP server

### 4. Maintain Backward Compatibility
- Plain number: `/close-issue 123` (uses git detection)
- Full URL: `/close-issue https://gitlab.com/group/project/-/issues/123`
- With context: `/close-issue 123 "focus on performance"`

## Acceptance Criteria
- [ ] Command works in GitHub repos (existing behavior maintained)
- [ ] Command works in GitLab repos (auto-detects and uses GitLab tools)
- [ ] Optional prompt argument supported
- [ ] Clear error messages when platform can't be detected
- [ ] Documentation updated

## Principle Alignment
- **Versioning Mindset**: Iterate on existing command rather than creating new one
- **OSE**: System adapts to repository context
- **Developer Experience**: Zero configuration required
- **Subtraction Creates Value**: Removes need for platform-specific commands

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with .claude/command-templates/close-issue.md and review spike #859 and PR #861 for the existing detection findings. Inspect the GitLab tools under mcp/servers/gitlab-mcp-server/ and the current GitHub tool usage. Done means GitHub and GitLab routing, number/URL/context arguments, clear detection errors, backward compatibility, and updated documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, github, shell
Domain
cli, developer-experience, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
Half a day
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.