🦀 ClawHub
Gitlab Mr Review
by @wujinyuan
Automatically fetches and reviews GitLab merge requests using a template to identify issues and post detailed, actionable review comments.
TERMINAL
clawhub install gitlab-mr-review📖 About This Skill
name: gitlab-mr-review description: Review GitLab merge requests using a standardized code review template. Use when user asks to review an MR (e.g., "帮我review这个mr: https://gitlab.xxx.com/..."). Automatically fetches MR changes, analyzes the diff, and posts a review comment following the template.
GitLab MR Review
This skill performs code reviews on GitLab merge requests using a standardized template.
Trigger
When user says something like:
Workflow
Step 1: Extract MR URL and Project Info
Parse the MR URL to extract:
Step 2: Configure glab for the GitLab instance
glab config set host https://
Step 3: Fetch MR Information
glab api projects//merge_requests/
Step 4: Fetch MR Changes (Diff)
glab api projects//merge_requests//changes
Step 5: Analyze the Diff
Read the review template at code-review-template.md and analyze the diff for:
Step 6: Generate Review Comment
Fill in the template with your analysis:
Step 7: Post Comment to MR
glab api projects//merge_requests//notes --method POST \
--raw-field body="$(cat review-comment.md)"
Or use inline with --raw-field body="