opencode-gitlab-plugin 2.0.1 → 2.0.2

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,13 @@
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
+ ## [2.0.2](https://gitlab.com/vglafirov/opencode-gitlab-plugin/compare/v2.0.1...v2.0.2) (2026-03-22)
6
+
7
+
8
+ ### 🐛 Bug Fixes
9
+
10
+ * **work-items:** use workItems(iid:) connection instead of non-existent workItem(iid:) ([e5ef90e](https://gitlab.com/vglafirov/opencode-gitlab-plugin/commit/e5ef90e557d2ee5e1e53ad85b65b3b71ea93d9cb))
11
+
5
12
  ## [2.0.1](https://gitlab.com/vglafirov/opencode-gitlab-plugin/compare/v2.0.0...v2.0.1) (2026-03-22)
6
13
 
7
14
 
package/dist/index.js CHANGED
@@ -757,40 +757,42 @@ var WORK_ITEM_LIST_FIELDS = `
757
757
  var GET_WORK_ITEM_QUERY = `
758
758
  query getWorkItem($fullPath: ID!, $iid: String!) {
759
759
  workspace: project(fullPath: $fullPath) {
760
- workItem(iid: $iid) {
761
- id
762
- iid
763
- title
764
- description
765
- state
766
- createdAt
767
- updatedAt
768
- closedAt
769
- confidential
770
- workItemType {
771
- id
772
- name
773
- }
774
- author {
760
+ workItems(iid: $iid, first: 1) {
761
+ nodes {
775
762
  id
776
- username
777
- name
778
- }
779
- assignees {
780
- nodes {
763
+ iid
764
+ title
765
+ description
766
+ state
767
+ createdAt
768
+ updatedAt
769
+ closedAt
770
+ confidential
771
+ workItemType {
781
772
  id
782
- username
783
773
  name
784
774
  }
785
- }
786
- labels {
787
- nodes {
775
+ author {
788
776
  id
789
- title
790
- color
777
+ username
778
+ name
779
+ }
780
+ assignees {
781
+ nodes {
782
+ id
783
+ username
784
+ name
785
+ }
791
786
  }
787
+ labels {
788
+ nodes {
789
+ id
790
+ title
791
+ color
792
+ }
793
+ }
794
+ webUrl
792
795
  }
793
- webUrl
794
796
  }
795
797
  }
796
798
  }
@@ -846,23 +848,25 @@ var LIST_GROUP_WORK_ITEMS_QUERY = `
846
848
  var GET_WORK_ITEM_NOTES_QUERY = `
847
849
  query getWorkItemNotes($fullPath: ID!, $iid: String!) {
848
850
  workspace: project(fullPath: $fullPath) {
849
- workItem(iid: $iid) {
850
- id
851
- iid
852
- notes {
853
- nodes {
854
- id
855
- body
856
- createdAt
857
- updatedAt
858
- author {
851
+ workItems(iid: $iid, first: 1) {
852
+ nodes {
853
+ id
854
+ iid
855
+ notes {
856
+ nodes {
859
857
  id
860
- username
861
- name
858
+ body
859
+ createdAt
860
+ updatedAt
861
+ author {
862
+ id
863
+ username
864
+ name
865
+ }
866
+ system
867
+ resolvable
868
+ resolved
862
869
  }
863
- system
864
- resolvable
865
- resolved
866
870
  }
867
871
  }
868
872
  }
@@ -963,8 +967,10 @@ var CREATE_NOTE_MUTATION = `
963
967
  var GET_WORK_ITEM_GID_QUERY = `
964
968
  query getWorkItemGid($fullPath: ID!, $iid: String!) {
965
969
  workspace: project(fullPath: $fullPath) {
966
- workItem(iid: $iid) {
967
- id
970
+ workItems(iid: $iid, first: 1) {
971
+ nodes {
972
+ id
973
+ }
968
974
  }
969
975
  }
970
976
  }
@@ -975,7 +981,7 @@ var WorkItemsClient = class extends GitLabApiClient {
975
981
  fullPath: projectId,
976
982
  iid: String(workItemIid)
977
983
  });
978
- const workItem = result.workspace?.workItem;
984
+ const workItem = result.workspace?.workItems?.nodes?.[0];
979
985
  if (!workItem) {
980
986
  throw new Error(`Work item with iid ${workItemIid} not found in project ${projectId}`);
981
987
  }
@@ -1004,7 +1010,7 @@ var WorkItemsClient = class extends GitLabApiClient {
1004
1010
  fullPath: projectId,
1005
1011
  iid: String(workItemIid)
1006
1012
  });
1007
- const workItem = result.workspace?.workItem;
1013
+ const workItem = result.workspace?.workItems?.nodes?.[0];
1008
1014
  if (!workItem) {
1009
1015
  throw new Error(`Work item with iid ${workItemIid} not found in project ${projectId}`);
1010
1016
  }
@@ -1031,7 +1037,7 @@ var WorkItemsClient = class extends GitLabApiClient {
1031
1037
  fullPath: projectId,
1032
1038
  iid: String(workItemIid)
1033
1039
  });
1034
- const gid = gidResult.workspace?.workItem?.id;
1040
+ const gid = gidResult.workspace?.workItems?.nodes?.[0]?.id;
1035
1041
  if (!gid) {
1036
1042
  throw new Error(`Work item with iid ${workItemIid} not found in project ${projectId}`);
1037
1043
  }
@@ -1056,7 +1062,7 @@ var WorkItemsClient = class extends GitLabApiClient {
1056
1062
  fullPath: projectId,
1057
1063
  iid: String(workItemIid)
1058
1064
  });
1059
- const gid = gidResult.workspace?.workItem?.id;
1065
+ const gid = gidResult.workspace?.workItems?.nodes?.[0]?.id;
1060
1066
  if (!gid) {
1061
1067
  throw new Error(`Work item with iid ${workItemIid} not found in project ${projectId}`);
1062
1068
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-gitlab-plugin",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "GitLab tools plugin for OpenCode - provides GitLab API access for merge requests, issues, pipelines, and more",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",