feat: add work items toolset via GraphQL API#362
Open
DarkByteZero wants to merge 8 commits intozereight:mainfrom
Open
feat: add work items toolset via GraphQL API#362DarkByteZero wants to merge 8 commits intozereight:mainfrom
DarkByteZero wants to merge 8 commits intozereight:mainfrom
Conversation
New `workitems` toolset with 6 tools replacing REST-based issue operations: - get_work_item: fetch single item with all widgets (status, hierarchy, labels, health status, dates, milestone, linked items, time tracking, development/MRs, custom fields) — output optimized, omits null/empty values - list_work_items: list/filter with pagination, returns lean summary per item - create_work_item: create any type with labels, assignees, weight, parent, health status, dates, milestone, confidential - update_work_item: consolidated update for all fields including status (by ID), parent/children hierarchy, linked items (related/blocks/blocked_by), custom fields, health status, dates, milestone - convert_work_item_type: type conversion via workItemConvert mutation - list_work_item_statuses: discover available statuses per type Supports all 9 work item types: issue, task, incident, test_case, epic, key_result, objective, requirement, ticket. Also fixes: - createIssue now passes all fields via spread (issue_type, weight were dropped) - Adds reusable GraphQL infrastructure (executeGraphQL, resolveWorkItemGID, resolveWorkItemTypeGID, resolveProjectPath)
Author
|
Later issues tools could be fully replaced by new WorkItem API actually. |
- Add list_custom_field_definitions tool to discover available custom fields per work item type - Enhance getWorkItem with iteration, progress, color, linked items details, weight rollup, confidential, author, createdAt/closedAt - Enhance list_work_item_statuses to return supported conversion types and allowed child/parent types - Add iteration_id support to create_work_item and update_work_item - Expand all type enums to include all 9 work item types - Remove tier annotations from descriptions
- Add move_work_item tool using GraphQL issueMove mutation - Remove redundant "Uses GitLab GraphQL API" from tool descriptions
…ools - list_work_item_notes: threaded discussions with pagination and sort - create_work_item_note: supports markdown, internal notes, and threaded replies
- Replace separate REST-based resolveLabelIds and resolveUserIds with single resolveNamesToIds GraphQL call (labels + users in one request) - Fix assignees: use assigneeIds (UserID GIDs) instead of assigneeUsernames which isn't supported by WorkItemWidgetAssigneesInput - Fix description type in update: String -> String! (non-null required) - Fix linkType: String! -> WorkItemRelatedLinkType! for linked items - Remove misleading 'labels' field from UpdateWorkItemSchema (only add_labels/remove_labels remain)
…inked items Add namespace.fullPath to children and linkedItems GraphQL queries so work items from other projects include their project path in the response.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GitLab standardizes planning objects around Work Items. The legacy Issues REST API remains supported, but it does not cover all modern work item capabilities. In particular, richer work item features such as configurable statuses and custom fields are exposed through the Work Item APIs, making GraphQL the more complete integration surface today.
This PR adds a new
workitemstoolset (opt-in viaGITLAB_TOOLSETS) with 10 tools that cover the full work item lifecycle using the GraphQL API:All 9 GitLab work item types are supported: issue, task, incident, test_case, epic, key_result, objective, requirement, ticket.
Additional changes
createIssuewhereissue_typeandweightfields were silently droppedexecuteGraphQL,resolveWorkItemGID,resolveWorkItemTypeGID,resolveProjectPathisDefault: false) so it does not affect existing usersTest plan