Skip to main content

Gitlab Review

@webframp/gitlab-reviewv2026.09.15.1· 1d 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
  • post_line_comment — Post a comment positioned on a specific file/line in the diff (REST discussions)
  • post_inline_review — Post SHA-bound, changed-line-validated inline review comments
02Release Notes

2026.09.15.1

Changed: Bump zod 4.4.3 → 4.6.5

2026.09.08.1

Added: SHA-bound, changed-line-validated batch inline review posting for approval-gated triage.

Upgrade note: Existing review resources are unchanged.

2026.08.28.1

Changed: Normalized the extension license to Apache-2.0 and corrected the copyright holder to "Sean Escriva". Extensions that previously shipped an MIT LICENSE.md are now Apache-2.0, consistent with the repository root and every other extension. No code or behavioral changes.

Upgrade note: License text only. No API, schema, or runtime behavior changed.

2026.08.26.3

Fixed: Restored inline npm:zod@4.4.3 import specifiers so the registry quality scorer can resolve dependencies and score the extension. An earlier release used a bare "zod" import-map specifier, which published but scored as unscored.

Changed: Retained explicit compilerOptions.strict in deno.json. No behavioral or schema changes.

03Models1
@webframp/gitlab-reviewv2026.09.15.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
fn post_line_comment(project: string, iid: number, body: string, newPath: string, oldPath?: string, newLine?: number, oldLine?: number)
Post a comment positioned on a specific file/line in an MR diff
ArgumentTypeDescription
projectstringProject path
iidnumberMerge request IID
bodystringComment body (markdown)
newPathstringFile path on the new side of the diff
oldPath?stringFile path on the old side of the diff (defaults to newPath —
newLine?numberLine number on the new side (added/changed lines)
oldLine?numberLine number on the old side (deleted lines)

Resources

mrDiff(7d)— MR diff content for review
reviewDraft(7d)— Draft review comment (editable before posting)
reviewPosted(30d)— Record of posted review comment
lineComment(30d)— Record of a diff-positioned line comment
inlineReview(30d)— SHA-bound batch inline review evidence
04Previous Versions17
2026.09.08.1

2026.09.08.1

Added: SHA-bound, changed-line-validated batch inline review posting for approval-gated triage.

Upgrade note: Existing review resources are unchanged.

2026.08.28.1

Changed: Normalized the extension license to Apache-2.0 and corrected the copyright holder to "Sean Escriva". Extensions that previously shipped an MIT LICENSE.md are now Apache-2.0, consistent with the repository root and every other extension. No code or behavioral changes.

Upgrade note: License text only. No API, schema, or runtime behavior changed.

2026.08.26.3

Fixed: Restored inline npm:zod@4.4.3 import specifiers so the registry quality scorer can resolve dependencies and score the extension. An earlier release used a bare "zod" import-map specifier, which published but scored as unscored.

Changed: Retained explicit compilerOptions.strict in deno.json. No behavioral or schema changes.

Modified 1 models

2026.08.28.1

2026.08.28.1

Changed: Normalized the extension license to Apache-2.0 and corrected the copyright holder to "Sean Escriva". Extensions that previously shipped an MIT LICENSE.md are now Apache-2.0, consistent with the repository root and every other extension. No code or behavioral changes.

Upgrade note: License text only. No API, schema, or runtime behavior changed.

2026.08.26.3

Fixed: Restored inline npm:zod@4.4.3 import specifiers so the registry quality scorer can resolve dependencies and score the extension. An earlier release used a bare "zod" import-map specifier, which published but scored as unscored.

Changed: Retained explicit compilerOptions.strict in deno.json. No behavioral or schema changes.

2026.08.26.3

2026.08.26.3

Fixed: Restored inline npm:zod@4.4.3 import specifiers so the registry quality scorer can resolve dependencies and score the extension. An earlier release used a bare "zod" import-map specifier, which published but scored as unscored.

Changed: Retained explicit compilerOptions.strict in deno.json. No behavioral or schema changes.

2026.08.26.1

2026.08.26.1

Fixed: Added missing description field to upgrade entry for version 2026.08.24.2. The omission caused swamp extension pull to fail with a catalog validation error ("upgrades.N.description: Invalid input: expected string, received undefined").

2026.08.25.1

2026.08.25.1

Changed: Updated labels for improved extension discoverability. Added cross-cutting category labels (security, observability, finops, infrastructure, networking, compliance, devops, ai, incident-response) where applicable.

updated labels

2026.08.24.3

2026.08.24.3

Added: Output metadata attributes for observability.

  • durationMs: Method execution duration in milliseconds.
  • collectedBy: Extension name that produced the data.
  • fetchedAt: ISO 8601 timestamp when data was fetched (added to resources that previously lacked it).
2026.08.24.2

2026.08.24.2

Added Troubleshooting section documenting post_review partial-failure scenario, large diff truncation, idempotent unapprove, list_mr_notes cross-extension dependency, token scope requirements, and no rate-limit retry.

2026.08.21.2

2026.08.21.2

Changed: project and iid method arguments (get_mr_diff, analyze, edit_draft, approve_mr, unapprove_mr, update_review, post_review, post_line_comment) are now validated up front — project must be non-empty and iid must be a positive integer. Previously an empty project path or a zero/negative/fractional iid passed schema validation and only failed deep inside a GitLab API call with a confusing 404 or 400. A malformed (non-JSON) response body from GitLab's GraphQL endpoint, the MR changes endpoint, the MR versions endpoint, or the discussions endpoint now raises a clear error naming the request that failed, instead of a raw JSON.parse SyntaxError.

2026.08.21.1

Changed: Added .describe() documentation to every previously undocumented field in the resource schemas (DiffFileSchema, MrDiffSchema, ReviewDraftSchema, ReviewPostedSchema, LineCommentSchema). Tightened host and token in the global arguments to require a non-empty string. No behavioral change — a no-op upgrades entry was added to keep the model's typeVersion tracking in sync with the version bump.

2026.08.07.1

Added: post_line_comment method — posts a comment positioned on a specific file/line in an MR diff (GitLab REST discussions API), for the standard diff-level code-review UX that post_review (top-level notes only) doesn't cover. Fetches the MR's current diff versions to build the required base_sha/start_sha/head_sha position, then creates a positioned discussion thread. Accepts newLine and/or oldLine (at least one required) to comment on added, deleted, or context lines. New lineComment resource records discussionId, noteId, and the file/line position of each posted comment, keyed per file/line so multiple comments on the same MR are stored as separate instances (lifetime: 30d, garbageCollection: 20, additive — no changes to existing resources).

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.
2026.08.21.1

2026.08.21.1

Changed: Added .describe() documentation to every previously undocumented field in the resource schemas (DiffFileSchema, MrDiffSchema, ReviewDraftSchema, ReviewPostedSchema, LineCommentSchema). Tightened host and token in the global arguments to require a non-empty string. No behavioral change — a no-op upgrades entry was added to keep the model's typeVersion tracking in sync with the version bump.

2026.08.07.1

Added: post_line_comment method — posts a comment positioned on a specific file/line in an MR diff (GitLab REST discussions API), for the standard diff-level code-review UX that post_review (top-level notes only) doesn't cover. Fetches the MR's current diff versions to build the required base_sha/start_sha/head_sha position, then creates a positioned discussion thread. Accepts newLine and/or oldLine (at least one required) to comment on added, deleted, or context lines. New lineComment resource records discussionId, noteId, and the file/line position of each posted comment, keyed per file/line so multiple comments on the same MR are stored as separate instances (lifetime: 30d, garbageCollection: 20, additive — no changes to existing resources).

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.
2026.08.07.1

2026.08.07.1

Added: post_line_comment method — posts a comment positioned on a specific file/line in an MR diff (GitLab REST discussions API), for the standard diff-level code-review UX that post_review (top-level notes only) doesn't cover. Fetches the MR's current diff versions to build the required base_sha/start_sha/head_sha position, then creates a positioned discussion thread. Accepts newLine and/or oldLine (at least one required) to comment on added, deleted, or context lines. New lineComment resource records discussionId, noteId, and the file/line position of each posted comment, keyed per file/line so multiple comments on the same MR are stored as separate instances (lifetime: 30d, garbageCollection: 20, additive — no changes to existing resources).

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.

Modified 1 models

2026.07.18.1

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.
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
38
Archive size
27.1 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