GitLab MR Code Review OpenClaw Skill

Automated AI code review for GitLab Merge Requests via polling. Periodically checks for open MRs, reviews code diffs for security vulnerabilities, bugs, and...

v1.0.0 Recently Updated Updated 3 days ago

Installation

clawhub install gitlab-auto-review

Requires npm i -g clawhub

41

Downloads

1

Stars

0

current installs

0 all-time

1

Versions

EU EU-Hosted Inference API

Power your OpenClaw skills with the best open-source models.

Drop-in OpenAI-compatible API. No data leaves Europe.

Explore Inference API

GLM

GLM 5

$1.00 / $3.20

per M tokens

Kimi

Kimi K2.5

$0.60 / $2.80

per M tokens

MiniMax

MiniMax M2.5

$0.30 / $1.20

per M tokens

Qwen

Qwen3.5 122B

$0.40 / $3.00

per M tokens

GitLab MR Code Review

Polling-based automated code review for GitLab MRs.

Architecture

Cron (*/2 * * * *) → gitlab-api.js list-mrs → skip reviewed → fetch diff → AI review → post comments/note
  • No webhook server — pure polling
  • Reviewed MRs tracked in {baseDir}/mr-reviewed.json

Setup

  1. Set env vars (GITLAB_URL, GITLAB_TOKEN) in your shell environment or .env file
  2. Test: node {baseDir}/scripts/gitlab-api.js get-version
  3. Install cron worker — see references/cron-setup.md for the full command

API Script Reference

node {baseDir}/scripts/gitlab-api.js get-version                              # Test connection
node {baseDir}/scripts/gitlab-api.js list-mrs                                 # List open MRs
node {baseDir}/scripts/gitlab-api.js list-mrs --project <project_path>        # Filter by project
node {baseDir}/scripts/gitlab-api.js get-changes <project_id> <mr_iid>        # Fetch MR diff
node {baseDir}/scripts/gitlab-api.js get-file <project_id> <branch> <path>    # Fetch file content
node {baseDir}/scripts/gitlab-api.js post-comment --file <json> <pid> <iid>   # Inline comment (use --file!)
node {baseDir}/scripts/gitlab-api.js post-note <project_id> <mr_iid> '<text>' # Summary note

post-comment JSON format

{
  "body": "**[Critical]** sql_injection\n\nRaw query with user input.",
  "position": {
    "base_sha": "abc123",
    "start_sha": "def456",
    "head_sha": "ghi789",
    "new_path": "src/db.js",
    "new_line": 42
  }
}

base_sha/start_sha/head_sha come from get-changes output's diff_refs.

Review Rules

  • Default: references/review-guidelines.md — severity levels, output format, what to skip
  • Per-project: Place .gitlab-review-prompt.md in the repo root; the worker auto-fetches it via get-file

Troubleshooting

Problem Fix
MRs not reviewed openclaw cron list — is worker enabled?
API errors node {baseDir}/scripts/gitlab-api.js get-version
Duplicate reviews Check {baseDir}/mr-reviewed.json exists and is writable
Garbled comments Use --file mode for post-comment (Windows PowerShell encoding)
Wrong line numbers new_line must be the line number in the NEW version of the file

Statistics

Downloads 41
Stars 1
Current installs 0
All-time installs 0
Versions 1
Comments 0
Created Apr 3, 2026
Updated Apr 3, 2026

Latest Changes

v1.0.0 · Apr 3, 2026

- Initial release: Automated AI code review for GitLab Merge Requests via polling. - Reviews code diffs for security, bugs, and best practices, posting inline comments and summary notes directly on GitLab. - Supports custom project-level review rules with `.gitlab-review-prompt.md`. - Simple setup: configure via environment variables and cron job; no webhooks required. - Includes troubleshooting tips and a detailed API script reference for integration and testing.

Quick Install

clawhub install gitlab-auto-review
EU Made in Europe

Chat with 100+ AI Models in one App.

Use Claude, ChatGPT, Gemini alongside with EU-Hosted Models like Deepseek, GLM-5, Kimi K2.5 and many more.