Skip to content

Latest commit

 

History

History
63 lines (40 loc) · 2.35 KB

File metadata and controls

63 lines (40 loc) · 2.35 KB

glab-mr

GitLab MR tools for Claude Code - fix failed CI, resolve comments, and more.

Commands

/glab-mr:fix-all

Fetches comprehensive MR state (comments + pipeline) and helps fix all issues:

  1. Failed CI Jobs - Analyzes job logs and fixes code issues
  2. Unresolved Comments - Reviews and addresses discussion threads
  3. Resolved Comments Verification - Checks for missed actionable feedback

/glab-mr:overview

Fetches comprehensive MR state and presents a clear status overview without taking any action.

/glab-mr:comments

Fetches only MR comments, analyzes them, and proposes what to do:

  1. Unresolved Comments - Reviews discussion threads and proposes actions
  2. Resolved Comments Verification - Checks for missed actionable feedback

/glab-mr:pipeline

Fetches only pipeline status and job logs, triages failures and proposes fixes.

Requirements

  • Claude Code 2.1.0 or newer (see Known Issue below)
  • glab CLI installed and authenticated
  • glab-discussion for discussion handling (uv tool install glab-discussion)
  • jq for JSON processing

How it works

The plugin includes a bash script that:

  1. Auto-detects the MR from your current git branch
  2. Fetches MR info via glab mr view
  3. Delegates discussion fetching to glab-discussion read --dump (per-thread files with incremental updates, bot detection, diff note positions)
  4. Fetches pipeline status, job details, and logs in parallel with retry

Output:

  • mr-info.txt - Full MR details (in /tmp/glab-mr-<id>-<timestamp>/)
  • /tmp/glab-discussion/<host>/mr-<iid>/*.txt - One file per discussion thread (managed by glab-discussion)
  • full-pipeline-summary.txt - Pipeline status and all jobs
  • job-logs/ - Individual log files for each job

Installation

claude plugin marketplace add fprochazka/claude-code-plugins --scope user
claude plugin install glab-mr@fprochazka-claude-code-plugins --scope user

Known Issue

This plugin requires Claude Code 2.1.0+ due to a bug in older versions where ${CLAUDE_PLUGIN_ROOT} was not properly substituted in plugin allowed-tools frontmatter.

If you see Error: Bash command permission check failed, upgrade Claude Code to 2.1.0 or newer.