Skip to content

cloudthinker-ai/CloudSkills / skills/connections/managing-gitlab-merge-requests

managing-gitlab-merge-requests

Verified

Use when working with Gitlab Merge Requests — gitLab merge request review management including approval rules, merge checks, code ownership via CODEOWNERS, merge request policies, and pipeline integration. Use when configuring or automating GitLab MR review workflows across projects and groups.

Managing GitLab Merge Requests

Overview

Manage GitLab merge request review workflows, including approval rules, CODEOWNERS enforcement, merge checks, and pipeline-gated merges.

Key Capabilities

  • Configure merge request approval rules at project and group level
  • Set up CODEOWNERS for automatic approval requirements
  • Define merge checks (pipeline success, resolved discussions, signed commits)
  • Manage merge request policies and merge methods
  • Configure merge trains for high-throughput repositories
  • Enforce approval policies via group-level compliance frameworks

Workflow

1 — Approval Rules Configuration

APPROVAL RULES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[ ] Default approvals required: ___
[ ] Rules:
    Rule Name            | Approvers              | Required
    ─────────────────────┼────────────────────────┼─────────
    Backend Review       | @backend-team          | 1
    Security Review      | @security-team         | 1
    Architecture Review  | @architects            | 1 (optional)
[ ] Prevent author self-approval: YES / NO
[ ] Prevent committers from approving: YES / NO
[ ] Remove all approvals on new push: YES / NO

2 — Merge Checks

MERGE CHECKS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[ ] Pipeline must succeed: YES / NO
[ ] All discussions must be resolved: YES / NO
[ ] All status checks must pass: YES / NO
[ ] Signed commits required: YES / NO
[ ] Merge method: merge commit / squash / fast-forward
[ ] Merge trains enabled: YES / NO
[ ] Semi-linear history: YES / NO

3 — CODEOWNERS Setup

CODEOWNERS FILE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Location: CODEOWNERS (root or docs/)

Sections:
  [Backend]
  /src/api/         @backend-team
  /src/services/    @backend-team

  [Frontend]
  /src/ui/          @frontend-team
  /src/components/  @frontend-team

  [Infrastructure]
  /terraform/       @platform-team
  .gitlab-ci.yml    @devops-team

Optional vs Required sections:
  ^[Docs]           @tech-writers    (optional)
  [Security]        @security-team   (required)

4 — Compliance Framework

GROUP-LEVEL COMPLIANCE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[ ] Compliance framework applied: ___
[ ] Separation of duties enforced: YES / NO
[ ] Compliance pipeline configured: YES / NO
[ ] Audit events enabled: YES / NO

Common Operations

Review Pending MRs

List open merge requests awaiting approval, filter by project or group.

Audit Approval Compliance

Verify that merge requests follow required approval rules and CODEOWNERS requirements.

Merge Train Management

Monitor and manage merge train queues for high-throughput branches.

Troubleshooting

IssueCauseFix
Approvals not requiredRules not configured at project levelSet approval rules in Project > Settings > Merge Requests
CODEOWNERS not enforcedPremium/Ultimate requiredCODEOWNERS approval requires GitLab Premium+
Merge train failuresPipeline conflictsCheck merge train pipeline logs for conflicts
Approvals reset unexpectedly"Remove approvals on push" enabledDisable in project settings if not desired

Output Format

Present results as a structured report:

Managing Gitlab Merge Requests Report
═════════════════════════════════════
Resources discovered: [count]

Resource       Status    Key Metric    Issues
──────────────────────────────────────────────
[name]         [ok/warn] [value]       [findings]

Summary: [total] resources | [ok] healthy | [warn] warnings | [crit] critical
Action Items: [list of prioritized findings]

Target ≤50 lines of output. Use tables for multi-resource comparisons.

Anti-Hallucination Rules

  1. NEVER assume resource names — always discover via CLI/API in Phase 1 before referencing in Phase 2.
  2. NEVER fabricate metric names or dimensions — verify against the service documentation or --help output.
  3. NEVER mix CLI commands between service versions — confirm which version/API you are targeting.
  4. ALWAYS use the discovery → verify → analyze chain — every resource referenced must have been discovered first.
  5. ALWAYS handle empty results gracefully — an empty response is valid data, not an error to retry.

Counter-Rationalizations

ShortcutCounterWhy
"I'll skip discovery and check known resources"Always run Phase 1 discovery firstResource names change, new resources appear — assumed names cause errors
"The user only asked for a quick check"Follow the full discovery → analysis flowQuick checks miss critical issues; structured analysis catches silent failures
"Default configuration is probably fine"Audit configuration explicitlyDefaults often leave logging, security, and optimization features disabled
"Metrics aren't needed for this"Always check relevant metrics when availableAPI/CLI responses show current state; metrics reveal trends and intermittent issues
"I don't have access to that"Try the command and report the actual errorAssumed permission failures prevent useful investigation; actual errors are informative
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 319kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 117kUpdated Claude CodeCodexVerifiedInstall