feat(gitlab): add release and branch-compare tools, remove dead types#5475
Conversation
- Add gitlab_delete_branch, gitlab_compare_branches, gitlab_list_releases, gitlab_create_release tools + block wiring (fills gaps found during a full validate-integration pass against live GitLab API docs) - Remove 12 unexported, zero-consumer types left over from never-implemented tool ideas (labels, users, current-user, branch/notes listing) - Add filePath/branch block outputs that get_file/create_file/update_file already returned but weren't exposed - Broaden state/orderBy param descriptions to list all documented GitLab values
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview The block UI gains compare fields ( Types cleanup removes unused, never-exported GitLab param/response shapes (labels, users, notes listing, etc.) and introduces exported types for the new tools. Minor doc tweaks: MR Reviewed by Cursor Bugbot for commit aba2162. Configure here. |
Greptile SummaryThis PR extends the GitLab block with four new operations —
Confidence Score: 5/5All changes are purely additive (new tools + dead-code removal); no existing tool logic is modified. Every new tool follows the established pattern for URL encoding, headers, body serialization, and response transformation. The dead-type removal is confined to unexported, zero-consumer interfaces, so no compiled output changes. The block wiring is complete and internally consistent across dropdown, subBlocks, conditions, access list, and switch-case configs. The existing 7-test GitLab suite is unaffected. No files require special attention. Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant Block as GitLab Block
participant Runner as Tool Runner
participant API as GitLab REST API
Note over Block,API: Delete Branch
Block->>Runner: "gitlab_delete_branch {projectId, branch}"
Runner->>API: DELETE /projects/:id/repository/branches/:branch
API-->>Runner: 204 No Content
Runner-->>Block: "{success: true}"
Note over Block,API: Compare Branches
Block->>Runner: "gitlab_compare_branches {projectId, from, to, straight?}"
Runner->>API: GET /projects/:id/repository/compare
API-->>Runner: "{commit, commits[], diffs[], compare_timeout, compare_same_ref}"
Runner-->>Block: "{commit, commits, diffs, compareTimeout, compareSameRef, webUrl}"
Note over Block,API: List Releases
Block->>Runner: "gitlab_list_releases {projectId, orderBy?, sort?, perPage?, page?}"
Runner->>API: GET /projects/:id/releases
API-->>Runner: releases[] + x-total header
Runner-->>Block: "{releases, total}"
Note over Block,API: Create Release
Block->>Runner: "gitlab_create_release {projectId, tagName, name?, description?, ref?, releasedAt?, milestones?}"
Runner->>API: POST /projects/:id/releases
API-->>Runner: release object
Runner-->>Block: "{release}"
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant Block as GitLab Block
participant Runner as Tool Runner
participant API as GitLab REST API
Note over Block,API: Delete Branch
Block->>Runner: "gitlab_delete_branch {projectId, branch}"
Runner->>API: DELETE /projects/:id/repository/branches/:branch
API-->>Runner: 204 No Content
Runner-->>Block: "{success: true}"
Note over Block,API: Compare Branches
Block->>Runner: "gitlab_compare_branches {projectId, from, to, straight?}"
Runner->>API: GET /projects/:id/repository/compare
API-->>Runner: "{commit, commits[], diffs[], compare_timeout, compare_same_ref}"
Runner-->>Block: "{commit, commits, diffs, compareTimeout, compareSameRef, webUrl}"
Note over Block,API: List Releases
Block->>Runner: "gitlab_list_releases {projectId, orderBy?, sort?, perPage?, page?}"
Runner->>API: GET /projects/:id/releases
API-->>Runner: releases[] + x-total header
Runner-->>Block: "{releases, total}"
Note over Block,API: Create Release
Block->>Runner: "gitlab_create_release {projectId, tagName, name?, description?, ref?, releasedAt?, milestones?}"
Runner->>API: POST /projects/:id/releases
API-->>Runner: release object
Runner-->>Block: "{release}"
Reviews (3): Last reviewed commit: "fix(gitlab): drop empty entries when spl..." | Re-trigger Greptile |
- Add total, size, ref, blobId, lastCommitId, mergeRequestIid, changesCount, approvedBy, protected, id, status to the block outputs map — these fields are already returned by their respective tools but weren't declared as outputs - Add missing 'title' value to list_issues orderBy description
Trailing/extra commas in the milestones input (e.g. "v1, ,v2") would produce an empty string entry, which the GitLab API rejects.
|
@greptile review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit aba2162. Configure here.
|
@greptile review |
Summary
Type of Change
Testing
bun run lint,tsc --noEmit,bun run check:api-validationall pass cleanChecklist