@gitlab/opencode-gitlab-plugin 1.5.7 → 1.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +19 -22
- package/dist/gitlab-opencode-gitlab-plugin-1.5.9.tgz +0 -0
- package/dist/index.js +82 -78
- package/package.json +1 -1
- package/dist/gitlab-opencode-gitlab-plugin-1.5.7.tgz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [1.5.9](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/compare/v1.5.8...v1.5.9) (2026-02-03)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 🐛 Bug Fixes
|
|
9
|
+
|
|
10
|
+
* rebuild dist after tools consolidation ([ea65540](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/commit/ea65540794ea6cdf39afceb184e61b4d4052f1e3))
|
|
11
|
+
|
|
12
|
+
## [1.5.8](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/compare/v1.5.7...v1.5.8) (2026-02-03)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### ♻️ Code Refactoring
|
|
16
|
+
|
|
17
|
+
* consolidate MR details, CI lint, and todo tools ([46d830f](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/commit/46d830fd6d9fabf851d7f6e8cc00836e55c7f266))
|
|
18
|
+
|
|
5
19
|
## [1.5.7](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/compare/v1.5.6...v1.5.7) (2026-02-03)
|
|
6
20
|
|
|
7
21
|
|
package/README.md
CHANGED
|
@@ -287,9 +287,9 @@ Or for API tokens:
|
|
|
287
287
|
|
|
288
288
|
## 🛠️ Available Tools
|
|
289
289
|
|
|
290
|
-
The plugin provides **
|
|
290
|
+
The plugin provides **64 tools** organized into the following categories:
|
|
291
291
|
|
|
292
|
-
### Merge Request Tools (
|
|
292
|
+
### Merge Request Tools (8 tools)
|
|
293
293
|
|
|
294
294
|
| Tool | Description |
|
|
295
295
|
| --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -298,8 +298,7 @@ The plugin provides **67 tools** organized into the following categories:
|
|
|
298
298
|
| `gitlab_create_merge_request` | Create a new merge request |
|
|
299
299
|
| `gitlab_update_merge_request` | Update merge request title, description, state, assignees, reviewers, and labels |
|
|
300
300
|
| `gitlab_get_mr_changes` | Get file changes/diffs for a merge request |
|
|
301
|
-
| `
|
|
302
|
-
| `gitlab_get_mr_pipelines` | Get all pipelines for a merge request |
|
|
301
|
+
| `gitlab_get_mr_details` | Get additional MR details (commits or pipelines) with detail_type parameter |
|
|
303
302
|
| `gitlab_list_merge_request_diffs` | List file diffs with pagination support for large changesets |
|
|
304
303
|
| `gitlab_set_mr_auto_merge` | Enable auto-merge (MWPS) using GraphQL API when pipeline succeeds |
|
|
305
304
|
|
|
@@ -321,18 +320,17 @@ The plugin provides **67 tools** organized into the following categories:
|
|
|
321
320
|
| `gitlab_update_epic` | Update epic title, description, labels, dates, and state |
|
|
322
321
|
| `gitlab_manage_epic_issues` | Manage issues linked to an epic (list, add, remove) with action parameter |
|
|
323
322
|
|
|
324
|
-
### Pipeline Tools (
|
|
323
|
+
### Pipeline Tools (7 tools)
|
|
325
324
|
|
|
326
|
-
| Tool | Description
|
|
327
|
-
| ---------------------------------- |
|
|
328
|
-
| `gitlab_list_pipelines` | List pipelines with filtering by status, ref, and username
|
|
329
|
-
| `gitlab_get_pipeline` | Get pipeline details with jobs and status
|
|
330
|
-
| `gitlab_list_pipeline_jobs` | List all jobs in a pipeline with optional scope filtering
|
|
331
|
-
| `gitlab_get_job_log` | Get the log output of a specific CI job
|
|
332
|
-
| `gitlab_retry_job` | Retry a failed or canceled job
|
|
333
|
-
| `gitlab_get_pipeline_failing_jobs` | Get only failed jobs for easier debugging
|
|
334
|
-
| `gitlab_lint_ci_config` | Validate CI/CD YAML
|
|
335
|
-
| `gitlab_lint_existing_ci_config` | Validate existing .gitlab-ci.yml from repository |
|
|
325
|
+
| Tool | Description |
|
|
326
|
+
| ---------------------------------- | ------------------------------------------------------------------------------- |
|
|
327
|
+
| `gitlab_list_pipelines` | List pipelines with filtering by status, ref, and username |
|
|
328
|
+
| `gitlab_get_pipeline` | Get pipeline details with jobs and status |
|
|
329
|
+
| `gitlab_list_pipeline_jobs` | List all jobs in a pipeline with optional scope filtering |
|
|
330
|
+
| `gitlab_get_job_log` | Get the log output of a specific CI job |
|
|
331
|
+
| `gitlab_retry_job` | Retry a failed or canceled job |
|
|
332
|
+
| `gitlab_get_pipeline_failing_jobs` | Get only failed jobs for easier debugging |
|
|
333
|
+
| `gitlab_lint_ci_config` | Validate CI/CD YAML config with mode parameter (content or existing repository) |
|
|
336
334
|
|
|
337
335
|
### Repository Tools (7 tools)
|
|
338
336
|
|
|
@@ -379,14 +377,13 @@ The plugin provides **67 tools** organized into the following categories:
|
|
|
379
377
|
|
|
380
378
|
**Note**: All GraphQL-based security tools include automatic GID (Global ID) format validation.
|
|
381
379
|
|
|
382
|
-
### TODO Tools (
|
|
380
|
+
### TODO Tools (3 tools)
|
|
383
381
|
|
|
384
|
-
| Tool
|
|
385
|
-
|
|
|
386
|
-
| `gitlab_list_todos`
|
|
387
|
-
| `gitlab_mark_todo_done`
|
|
388
|
-
| `
|
|
389
|
-
| `gitlab_get_todo_count` | Get count of pending TODOs (GraphQL) |
|
|
382
|
+
| Tool | Description |
|
|
383
|
+
| ----------------------- | ------------------------------------------------------ |
|
|
384
|
+
| `gitlab_list_todos` | List TODO items with cursor-based pagination (GraphQL) |
|
|
385
|
+
| `gitlab_mark_todo_done` | Mark TODOs as done with action parameter (one or all) |
|
|
386
|
+
| `gitlab_get_todo_count` | Get count of pending TODOs (GraphQL) |
|
|
390
387
|
|
|
391
388
|
### Project & User Tools (3 tools)
|
|
392
389
|
|
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -2155,30 +2155,33 @@ Can update title, description, state, assignees, reviewers, labels, and more.`,
|
|
|
2155
2155
|
return JSON.stringify(mr, null, 2);
|
|
2156
2156
|
}
|
|
2157
2157
|
}),
|
|
2158
|
-
|
|
2159
|
-
description: `Get
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
return JSON.stringify(commits, null, 2);
|
|
2169
|
-
}
|
|
2170
|
-
}),
|
|
2171
|
-
gitlab_get_mr_pipelines: tool({
|
|
2172
|
-
description: `Get the list of pipelines for a merge request.
|
|
2173
|
-
Returns all pipelines that ran for the merge request.`,
|
|
2158
|
+
gitlab_get_mr_details: tool({
|
|
2159
|
+
description: `Get additional details for a merge request.
|
|
2160
|
+
|
|
2161
|
+
Detail types:
|
|
2162
|
+
- commits: List all commits in the MR
|
|
2163
|
+
- pipelines: List all pipelines that ran for the MR
|
|
2164
|
+
|
|
2165
|
+
Examples:
|
|
2166
|
+
- Get commits: detail_type="commits", project_id="group/project", mr_iid=123
|
|
2167
|
+
- Get pipelines: detail_type="pipelines", project_id="group/project", mr_iid=123`,
|
|
2174
2168
|
args: {
|
|
2169
|
+
detail_type: z.enum(["commits", "pipelines"]).describe("Type of details to fetch"),
|
|
2175
2170
|
project_id: z.string().describe("The project ID or URL-encoded path"),
|
|
2176
2171
|
mr_iid: z.number().describe("The internal ID of the merge request")
|
|
2177
2172
|
},
|
|
2178
2173
|
execute: async (args, _ctx) => {
|
|
2179
2174
|
const client = getGitLabClient();
|
|
2180
|
-
|
|
2181
|
-
|
|
2175
|
+
switch (args.detail_type) {
|
|
2176
|
+
case "commits": {
|
|
2177
|
+
const commits = await client.getMrCommits(args.project_id, args.mr_iid);
|
|
2178
|
+
return JSON.stringify(commits, null, 2);
|
|
2179
|
+
}
|
|
2180
|
+
case "pipelines": {
|
|
2181
|
+
const pipelines = await client.getMrPipelines(args.project_id, args.mr_iid);
|
|
2182
|
+
return JSON.stringify(pipelines, null, 2);
|
|
2183
|
+
}
|
|
2184
|
+
}
|
|
2182
2185
|
}
|
|
2183
2186
|
}),
|
|
2184
2187
|
gitlab_list_merge_request_diffs: tool({
|
|
@@ -2559,66 +2562,58 @@ This validates the configuration in the context of the project, including:
|
|
|
2559
2562
|
- Optionally simulating pipeline creation (dry_run)
|
|
2560
2563
|
- Optionally including the list of jobs that would be created
|
|
2561
2564
|
|
|
2565
|
+
Modes:
|
|
2566
|
+
- content: Validate provided YAML content (requires 'content' parameter)
|
|
2567
|
+
- existing: Validate the existing .gitlab-ci.yml from the repository
|
|
2568
|
+
|
|
2562
2569
|
Returns validation result with:
|
|
2563
2570
|
- valid: boolean indicating if configuration is valid
|
|
2564
2571
|
- errors: array of error messages
|
|
2565
2572
|
- warnings: array of warning messages
|
|
2566
2573
|
- merged_yaml: the final merged YAML after processing includes (optional)
|
|
2567
|
-
-
|
|
2574
|
+
- includes: list of included files (for existing mode)
|
|
2575
|
+
- jobs: list of jobs that would be created (optional, requires include_jobs=true)
|
|
2576
|
+
|
|
2577
|
+
Examples:
|
|
2578
|
+
- Validate content: mode="content", project_id="group/project", content="stages: [build]..."
|
|
2579
|
+
- Validate existing: mode="existing", project_id="group/project"`,
|
|
2568
2580
|
args: {
|
|
2581
|
+
mode: z4.enum(["content", "existing"]).describe('Validation mode: "content" for provided YAML, "existing" for repo file'),
|
|
2569
2582
|
project_id: z4.string().describe("The project ID or URL-encoded path"),
|
|
2570
|
-
content: z4.string().describe(
|
|
2583
|
+
content: z4.string().optional().describe('The CI/CD configuration content (YAML as string) - required for mode="content"'),
|
|
2571
2584
|
dry_run: z4.boolean().optional().describe("Run pipeline creation simulation instead of just static check (default: false)"),
|
|
2572
2585
|
include_jobs: z4.boolean().optional().describe("Include list of jobs that would be created in the response (default: false)"),
|
|
2573
2586
|
ref: z4.string().optional().describe(
|
|
2574
2587
|
"Branch or tag context to use for validation (defaults to project default branch)"
|
|
2575
|
-
)
|
|
2576
|
-
},
|
|
2577
|
-
execute: async (args, _ctx) => {
|
|
2578
|
-
const client = getGitLabClient();
|
|
2579
|
-
const result = await client.lintCiConfig(args.project_id, args.content, {
|
|
2580
|
-
dry_run: args.dry_run,
|
|
2581
|
-
include_jobs: args.include_jobs,
|
|
2582
|
-
ref: args.ref
|
|
2583
|
-
});
|
|
2584
|
-
return JSON.stringify(result, null, 2);
|
|
2585
|
-
}
|
|
2586
|
-
}),
|
|
2587
|
-
gitlab_lint_existing_ci_config: tool4({
|
|
2588
|
-
description: `Validate an existing .gitlab-ci.yml configuration from the repository.
|
|
2589
|
-
This validates the configuration in the context of the project, including:
|
|
2590
|
-
- Using the project's CI/CD variables
|
|
2591
|
-
- Searching the project's files for include:local entries
|
|
2592
|
-
- Optionally simulating pipeline creation (dry_run)
|
|
2593
|
-
- Optionally including the list of jobs that would be created
|
|
2594
|
-
|
|
2595
|
-
Returns validation result with:
|
|
2596
|
-
- valid: boolean indicating if configuration is valid
|
|
2597
|
-
- errors: array of error messages
|
|
2598
|
-
- warnings: array of warning messages
|
|
2599
|
-
- merged_yaml: the final merged YAML after processing includes (optional)
|
|
2600
|
-
- includes: list of included files with their locations (optional)
|
|
2601
|
-
- jobs: list of jobs that would be created (optional, requires include_jobs=true)`,
|
|
2602
|
-
args: {
|
|
2603
|
-
project_id: z4.string().describe("The project ID or URL-encoded path"),
|
|
2604
|
-
content_ref: z4.string().optional().describe(
|
|
2605
|
-
"Commit SHA, branch or tag to get CI config from (defaults to project default branch)"
|
|
2606
2588
|
),
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
),
|
|
2611
|
-
include_jobs: z4.boolean().optional().describe("Include list of jobs that would be created in the response (default: false)")
|
|
2589
|
+
content_ref: z4.string().optional().describe(
|
|
2590
|
+
'For mode="existing": Commit SHA, branch or tag to get CI config from (defaults to project default branch)'
|
|
2591
|
+
)
|
|
2612
2592
|
},
|
|
2613
2593
|
execute: async (args, _ctx) => {
|
|
2614
2594
|
const client = getGitLabClient();
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2595
|
+
switch (args.mode) {
|
|
2596
|
+
case "content": {
|
|
2597
|
+
if (!args.content) {
|
|
2598
|
+
return JSON.stringify({ error: 'content is required when mode is "content"' }, null, 2);
|
|
2599
|
+
}
|
|
2600
|
+
const result = await client.lintCiConfig(args.project_id, args.content, {
|
|
2601
|
+
dry_run: args.dry_run,
|
|
2602
|
+
include_jobs: args.include_jobs,
|
|
2603
|
+
ref: args.ref
|
|
2604
|
+
});
|
|
2605
|
+
return JSON.stringify(result, null, 2);
|
|
2606
|
+
}
|
|
2607
|
+
case "existing": {
|
|
2608
|
+
const result = await client.lintExistingCiConfig(args.project_id, {
|
|
2609
|
+
content_ref: args.content_ref,
|
|
2610
|
+
dry_run: args.dry_run,
|
|
2611
|
+
dry_run_ref: args.ref,
|
|
2612
|
+
include_jobs: args.include_jobs
|
|
2613
|
+
});
|
|
2614
|
+
return JSON.stringify(result, null, 2);
|
|
2615
|
+
}
|
|
2616
|
+
}
|
|
2622
2617
|
}
|
|
2623
2618
|
})
|
|
2624
2619
|
};
|
|
@@ -3211,25 +3206,34 @@ Use 'before' with the 'startCursor' from pageInfo to get the previous page.`,
|
|
|
3211
3206
|
}
|
|
3212
3207
|
}),
|
|
3213
3208
|
gitlab_mark_todo_done: tool9({
|
|
3214
|
-
description: `Mark
|
|
3215
|
-
|
|
3209
|
+
description: `Mark TODO items as done.
|
|
3210
|
+
|
|
3211
|
+
Actions:
|
|
3212
|
+
- one: Mark a specific TODO item as done (requires todo_id)
|
|
3213
|
+
- all: Mark all pending TODO items as done
|
|
3214
|
+
|
|
3215
|
+
Examples:
|
|
3216
|
+
- Mark one: action="one", todo_id=123
|
|
3217
|
+
- Mark all: action="all"`,
|
|
3216
3218
|
args: {
|
|
3217
|
-
|
|
3219
|
+
action: z9.enum(["one", "all"]).describe('Action to perform: "one" for single TODO, "all" for all TODOs'),
|
|
3220
|
+
todo_id: z9.number().optional().describe('The ID of the TODO item (required for action="one")')
|
|
3218
3221
|
},
|
|
3219
3222
|
execute: async (args, _ctx) => {
|
|
3220
3223
|
const client = getGitLabClient();
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3224
|
+
switch (args.action) {
|
|
3225
|
+
case "one": {
|
|
3226
|
+
if (args.todo_id === void 0) {
|
|
3227
|
+
return JSON.stringify({ error: 'todo_id is required when action is "one"' }, null, 2);
|
|
3228
|
+
}
|
|
3229
|
+
const result = await client.markTodoAsDone(args.todo_id);
|
|
3230
|
+
return JSON.stringify(result, null, 2);
|
|
3231
|
+
}
|
|
3232
|
+
case "all": {
|
|
3233
|
+
const result = await client.markAllTodosAsDone();
|
|
3234
|
+
return JSON.stringify(result, null, 2);
|
|
3235
|
+
}
|
|
3236
|
+
}
|
|
3233
3237
|
}
|
|
3234
3238
|
}),
|
|
3235
3239
|
gitlab_get_todo_count: tool9({
|
package/package.json
CHANGED
|
Binary file
|