-
Notifications
You must be signed in to change notification settings - Fork 201
Adding work_item_unlink to remove links from a work item #365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds functionality to remove links from Azure DevOps work items by implementing a new work_item_unlink
tool. The tool allows batch removal of links from a single work item, supporting removal by specific URL or all links of a given type.
Key changes:
- Added
wit_work_item_unlink
tool with comprehensive link removal capabilities - Extended link type mapping to include "artifact" links
- Comprehensive test suite covering various scenarios including error handling
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
src/tools/workitems.ts | Implements the new work_item_unlink tool with batch link removal functionality and adds "artifact" link type support |
test/src/tools/workitems.test.ts | Comprehensive test suite for the new unlink tool covering success cases, edge cases, and error scenarios |
README.md | Documents the new wit_work_item_unlink tool in the available tools list |
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mi0r
path: `/relations/${idx}`, | ||
})); | ||
|
||
const updatedWorkItem = await workItemApi.updateWorkItem(null, apiUpdates, id, project); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
145
JSON.stringify(updatedWorkItem, null, 2), | ||
}, | ||
], | ||
isError: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nori
@@ -1468,6 +1468,400 @@ describe("configureWorkItemTools", () => { | |||
}); | |||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wriht tight
}, | ||
{ | ||
rel: "System.LinkTypes.Related", | ||
url: "https://dev.azure.com/contoso/_apis/wit/workItems/3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Silikonz
Added tool and tests to remove a link from a work item in batch. Meaning you can remove several links at once.
GitHub issue number #132
Associated Risks
N/A
✅ PR Checklist
🧪 How did you test it?
Added all new automated tests and tested manually. Will post video and prompts in follow-up commits or PR