Review merge request from GitLab
Use these deterministic scripts instead of crafting curl commands:
| Script | Purpose |
|---|---|
.claude/hooks/gitlab/scripts/get-mr.sh <iid> | Fetch MR details |
.claude/hooks/gitlab/scripts/get-mr.sh <iid> --with-changes | Fetch MR with diffs |
.claude/hooks/gitlab/scripts/add-mr-comment.sh <iid> | Add review comment |
All scripts support --help for usage details.
The hook has already fetched MR details and changed files. Review the context above for:
git fetch origin
git checkout origin/{source-branch}
Use the code-reviewer subagent to analyze:
For each finding, use the helper script to add inline comments:
General comment:
.claude/hooks/gitlab/scripts/add-mr-comment.sh {mr-iid} --body="Overall feedback here"
Inline comment on specific line:
.claude/hooks/gitlab/scripts/add-mr-comment.sh {mr-iid} \
--body="Suggestion: Consider using X instead of Y" \
--path="src/file.ts" \
--new-line=42
Comment on removed line:
.claude/hooks/gitlab/scripts/add-mr-comment.sh {mr-iid} \
--body="Why was this removed?" \
--path="src/file.ts" \
--old-line=30
Provide a summary of: