@gitlab/opencode-gitlab-plugin 1.5.8 → 1.6.0
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
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.6.0](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/compare/v1.5.9...v1.6.0) (2026-02-04)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features
|
|
9
|
+
|
|
10
|
+
* add client-side resolved filter to discussions and notes tools ([32bee6d](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/commit/32bee6d61547da402da5d9cc97e54b5776fa782c))
|
|
11
|
+
|
|
12
|
+
## [1.5.9](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/compare/v1.5.8...v1.5.9) (2026-02-03)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug Fixes
|
|
16
|
+
|
|
17
|
+
* rebuild dist after tools consolidation ([ea65540](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/commit/ea65540794ea6cdf39afceb184e61b4d4052f1e3))
|
|
18
|
+
|
|
5
19
|
## [1.5.8](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/compare/v1.5.7...v1.5.8) (2026-02-03)
|
|
6
20
|
|
|
7
21
|
|
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -3388,6 +3388,17 @@ Can update title, description, state, labels, and assignees.`,
|
|
|
3388
3388
|
// src/tools/discussions-unified.ts
|
|
3389
3389
|
import { tool as tool12 } from "@opencode-ai/plugin";
|
|
3390
3390
|
var z12 = tool12.schema;
|
|
3391
|
+
function filterDiscussionsByResolved(result, resolved) {
|
|
3392
|
+
if (resolved === void 0) {
|
|
3393
|
+
return result;
|
|
3394
|
+
}
|
|
3395
|
+
return {
|
|
3396
|
+
discussions: {
|
|
3397
|
+
...result.discussions,
|
|
3398
|
+
nodes: result.discussions.nodes.filter((d) => d.resolved === resolved)
|
|
3399
|
+
}
|
|
3400
|
+
};
|
|
3401
|
+
}
|
|
3391
3402
|
var positionSchema = z12.object({
|
|
3392
3403
|
base_sha: z12.string().describe("SHA of the base commit"),
|
|
3393
3404
|
start_sha: z12.string().describe("SHA of the start commit"),
|
|
@@ -3445,6 +3456,10 @@ Examples:
|
|
|
3445
3456
|
iid: z12.number().optional().describe("Internal ID of the resource (for merge_request, issue, epic)"),
|
|
3446
3457
|
sha: z12.string().optional().describe("Commit SHA (required for commit)"),
|
|
3447
3458
|
snippet_id: z12.number().optional().describe("Snippet ID (required for snippet)"),
|
|
3459
|
+
// Filtering
|
|
3460
|
+
resolved: z12.boolean().optional().describe(
|
|
3461
|
+
"Filter by resolved status: true for resolved, false for unresolved (client-side filtering)"
|
|
3462
|
+
),
|
|
3448
3463
|
// Pagination
|
|
3449
3464
|
first: z12.number().optional().describe("Number of items to return (default: 20)"),
|
|
3450
3465
|
after: z12.string().optional().describe("Cursor for pagination - use endCursor from previous response"),
|
|
@@ -3460,25 +3475,21 @@ Examples:
|
|
|
3460
3475
|
before: args.before,
|
|
3461
3476
|
last: args.last
|
|
3462
3477
|
};
|
|
3478
|
+
let result;
|
|
3463
3479
|
switch (args.resource_type) {
|
|
3464
3480
|
case "merge_request":
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
null,
|
|
3468
|
-
2
|
|
3469
|
-
);
|
|
3481
|
+
result = await client.listMrDiscussions(args.project_id, args.iid, paginationOptions);
|
|
3482
|
+
break;
|
|
3470
3483
|
case "issue":
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3484
|
+
result = await client.listIssueDiscussions(
|
|
3485
|
+
args.project_id,
|
|
3486
|
+
args.iid,
|
|
3487
|
+
paginationOptions
|
|
3475
3488
|
);
|
|
3489
|
+
break;
|
|
3476
3490
|
case "epic":
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
null,
|
|
3480
|
-
2
|
|
3481
|
-
);
|
|
3491
|
+
result = await client.listEpicDiscussions(args.group_id, args.iid, paginationOptions);
|
|
3492
|
+
break;
|
|
3482
3493
|
case "commit":
|
|
3483
3494
|
return JSON.stringify(
|
|
3484
3495
|
await client.listCommitDiscussions(args.project_id, args.sha),
|
|
@@ -3486,18 +3497,17 @@ Examples:
|
|
|
3486
3497
|
2
|
|
3487
3498
|
);
|
|
3488
3499
|
case "snippet":
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
paginationOptions
|
|
3494
|
-
),
|
|
3495
|
-
null,
|
|
3496
|
-
2
|
|
3500
|
+
result = await client.listSnippetDiscussions(
|
|
3501
|
+
args.project_id,
|
|
3502
|
+
args.snippet_id,
|
|
3503
|
+
paginationOptions
|
|
3497
3504
|
);
|
|
3505
|
+
break;
|
|
3498
3506
|
default:
|
|
3499
3507
|
throw new Error(`Unsupported resource type: ${args.resource_type}`);
|
|
3500
3508
|
}
|
|
3509
|
+
const filteredResult = filterDiscussionsByResolved(result, args.resolved);
|
|
3510
|
+
return JSON.stringify(filteredResult, null, 2);
|
|
3501
3511
|
}
|
|
3502
3512
|
}),
|
|
3503
3513
|
/**
|
|
@@ -3707,6 +3717,18 @@ Use after addressing feedback to indicate the discussion is complete.`,
|
|
|
3707
3717
|
// src/tools/notes-unified.ts
|
|
3708
3718
|
import { tool as tool13 } from "@opencode-ai/plugin";
|
|
3709
3719
|
var z13 = tool13.schema;
|
|
3720
|
+
function filterNotesByResolved(result, resolved) {
|
|
3721
|
+
if (resolved === void 0) {
|
|
3722
|
+
return result;
|
|
3723
|
+
}
|
|
3724
|
+
return {
|
|
3725
|
+
...result,
|
|
3726
|
+
notes: {
|
|
3727
|
+
...result.notes,
|
|
3728
|
+
nodes: result.notes.nodes.filter((n) => n.resolved === resolved)
|
|
3729
|
+
}
|
|
3730
|
+
};
|
|
3731
|
+
}
|
|
3710
3732
|
var VALID_LIST_CREATE_TYPES = ["merge_request", "issue", "epic", "snippet"];
|
|
3711
3733
|
var VALID_GET_NOTE_TYPES = ["issue", "epic"];
|
|
3712
3734
|
function validationError3(param, resourceType) {
|
|
@@ -3778,6 +3800,10 @@ Examples:
|
|
|
3778
3800
|
group_id: z13.string().optional().describe("Group ID or path. Required for epic"),
|
|
3779
3801
|
iid: z13.number().optional().describe("Internal ID of the resource (for merge_request, issue, epic)"),
|
|
3780
3802
|
snippet_id: z13.number().optional().describe("Snippet ID (required for snippet)"),
|
|
3803
|
+
// Filtering
|
|
3804
|
+
resolved: z13.boolean().optional().describe(
|
|
3805
|
+
"Filter by resolved status: true for resolved, false for unresolved (client-side filtering)"
|
|
3806
|
+
),
|
|
3781
3807
|
// Pagination
|
|
3782
3808
|
first: z13.number().optional().describe("Number of items to return from the beginning (default: 20, max: 100)"),
|
|
3783
3809
|
after: z13.string().optional().describe("Cursor for forward pagination - use endCursor from previous response"),
|
|
@@ -3793,34 +3819,29 @@ Examples:
|
|
|
3793
3819
|
last: args.last,
|
|
3794
3820
|
before: args.before
|
|
3795
3821
|
};
|
|
3822
|
+
let result;
|
|
3796
3823
|
switch (args.resource_type) {
|
|
3797
3824
|
case "merge_request":
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
null,
|
|
3801
|
-
2
|
|
3802
|
-
);
|
|
3825
|
+
result = await client.listMrNotes(args.project_id, args.iid, paginationOptions);
|
|
3826
|
+
break;
|
|
3803
3827
|
case "issue":
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
null,
|
|
3807
|
-
2
|
|
3808
|
-
);
|
|
3828
|
+
result = await client.listIssueNotes(args.project_id, args.iid, paginationOptions);
|
|
3829
|
+
break;
|
|
3809
3830
|
case "epic":
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
null,
|
|
3813
|
-
2
|
|
3814
|
-
);
|
|
3831
|
+
result = await client.listEpicNotes(args.group_id, args.iid, paginationOptions);
|
|
3832
|
+
break;
|
|
3815
3833
|
case "snippet":
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3834
|
+
result = await client.listSnippetNotes(
|
|
3835
|
+
args.project_id,
|
|
3836
|
+
args.snippet_id,
|
|
3837
|
+
paginationOptions
|
|
3820
3838
|
);
|
|
3839
|
+
break;
|
|
3821
3840
|
default:
|
|
3822
3841
|
throw new Error(`Unsupported resource type: ${args.resource_type}`);
|
|
3823
3842
|
}
|
|
3843
|
+
const filteredResult = filterNotesByResolved(result, args.resolved);
|
|
3844
|
+
return JSON.stringify(filteredResult, null, 2);
|
|
3824
3845
|
}
|
|
3825
3846
|
}),
|
|
3826
3847
|
/**
|
package/package.json
CHANGED
|
Binary file
|