← 返回
未分类

Gitlab Mr Review

Automatically fetches and reviews GitLab merge requests using a template to identify issues and post detailed, actionable review comments.
自动获取并审查 GitLab 合并请求,使用模板识别问题并发布详细、可操作的审查评论
wujinyuan wujinyuan 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 598
下载
💾 3
安装
1
版本
#latest

概述

GitLab MR Review

This skill performs code reviews on GitLab merge requests using a standardized template.

Trigger

When user says something like:

  • "帮我review这个mr: ${url}"
  • "review this mr: ${url}"
  • "帮我审查这个mr: ${url}"

Workflow

Step 1: Extract MR URL and Project Info

Parse the MR URL to extract:

  • GitLab host (e.g., gitlab.snowballtech.com)
  • Project path (e.g., bp/iot-admin-arco)
  • MR IID (e.g., 1321)

Step 2: Configure glab for the GitLab instance

glab config set host https://<hostname>

Step 3: Fetch MR Information

glab api projects/<project>/merge_requests/<iid>

Step 4: Fetch MR Changes (Diff)

glab api projects/<project>/merge_requests/<iid>/changes

Step 5: Analyze the Diff

Read the review template at code-review-template.md and analyze the diff for:

  • TODO/FIXME comments
  • Unfinished code
  • Hardcoded values
  • Potential bugs
  • Security issues
  • Code style issues
  • Missing error handling

Step 6: Generate Review Comment

Fill in the template with your analysis:

  • 概述: Brief summary of what the MR does
  • 优点: What went well
  • 建议: Specific suggestions with file paths and line numbers
  • 问题: Issues that need fixing
  • 结论: Action items (checkboxes)

Step 7: Post Comment to MR

glab api projects/<project>/merge_requests/<iid>/notes --method POST \
  --raw-field body="$(cat review-comment.md)"

Or use inline with --raw-field body=""

Tips

  • Use emoji to highlight severity (🔴 for critical, 🟡 for warnings, ✅ for good)
  • Be specific: include file paths and line numbers
  • Provide actionable feedback
  • Balance praise with constructive criticism

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-01 15:56 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 72 📥 182,119
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 679 📥 328,306
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 195 📥 67,779