Skip to main content

Gitlab Review

@webframp/gitlab-reviewv2026.07.18.1· 13d agoMODELS
01README

AI-assisted GitLab merge request code review with human approval gate. Uses GraphQL for notes and MR metadata, REST fallback for diff content and approve/unapprove (no CLI dependencies). Designed to pair with @dougschaefer/writing-voice for tone-consistent reviews driven from an agent harness.

Authentication

Requires a GitLab personal access token with api scope, stored in a swamp vault.

Methods

  • get_mr_diff — Fetch MR metadata (GraphQL) and file diffs (REST)
  • analyze — Store an AI-generated review draft
  • edit_draft — Revise the draft (versioned, retains history)
  • update_review — Edit an existing comment via GraphQL updateNote
  • approve_mr — Approve the MR without posting a comment (REST)
  • unapprove_mr — Remove approval / request changes (REST; idempotent — a never-approved MR is a no-op)
  • post_review — Post draft via GraphQL createNote, optionally approve/unapprove
02Release Notes

2026.07.18.1

Added: An upgrades array entry (no-op) to review.ts for proper typeVersion tracking on existing instances. No schema or behavior changes.

2026.07.08.1

Fixed:

  • unapprove_mr and post_review action=request_changes are now idempotent. GitLab's unapprove endpoint returns HTTP 404 when the caller has no approval to remove; that is the desired end state for "request changes", not an error. A never-approved MR no longer fails the call — the comment still posts and the MR is left unapproved. Non-404 errors still propagate.
03Models1
@webframp/gitlab-reviewv2026.07.18.1gitlab-review/review.ts

Global Arguments

ArgumentTypeDescription
hoststringGitLab hostname (e.g. gitlab.example.com)
tokenstringGitLab personal access token
fn get_mr_diff(project: string, iid: number)
Fetch MR metadata via GraphQL and file diffs via REST (raw diff content not available in GraphQL).
ArgumentTypeDescription
projectstringProject path (e.g. mygroup/myproject)
iidnumberMerge request IID
fn analyze(project: string, iid: number, body: string)
Store an AI-generated review draft for human review before posting.
ArgumentTypeDescription
projectstringProject path
iidnumberMerge request IID
bodystringReview comment body (markdown)
fn edit_draft(project: string, iid: number, body: string)
Replace the current review draft body. Creates a new version
ArgumentTypeDescription
projectstringProject path
iidnumberMerge request IID
bodystringUpdated review comment body (markdown)
fn approve_mr(project: string, iid: number)
Approve a merge request without posting a comment.
ArgumentTypeDescription
projectstringProject path
iidnumberMerge request IID
fn unapprove_mr(project: string, iid: number)
Remove approval from a merge request (request changes).
ArgumentTypeDescription
projectstringProject path
iidnumberMerge request IID
fn update_review(project: string, iid: number, noteId: number)
Edit an existing review comment on a GitLab MR via GraphQL updateNote mutation.
ArgumentTypeDescription
projectstringProject path
iidnumberMerge request IID
noteIdnumberNote ID to update
fn post_review(project: string, iid: number)
Post the current review draft as a comment via GraphQL createNote,
ArgumentTypeDescription
projectstringProject path
iidnumberMerge request IID

Resources

mrDiff(7d)— MR diff content for review
reviewDraft(7d)— Draft review comment (editable before posting)
reviewPosted(30d)— Record of posted review comment
04Previous Versions6
2026.07.08.1

2026.07.08.1

Fixed:

  • unapprove_mr and post_review action=request_changes are now idempotent. GitLab's unapprove endpoint returns HTTP 404 when the caller has no approval to remove; that is the desired end state for "request changes", not an error. A never-approved MR no longer fails the call — the comment still posts and the MR is left unapproved. Non-404 errors still propagate.
2026.06.24.1
2026.06.15.1
2026.06.08.1
2026.06.04.2
2026.06.04.1
05Stats
A
100 / 100
Downloads
22
Archive size
13.8 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
06Platforms
07Labels