feat: add wit_update_work_item_comment tool#940
Conversation
|
@microsoft-github-policy-service agree |
danhellem
left a comment
There was a problem hiding this comment.
Please add the tool to the Toolset.md as well
0a4078a to
6bc6862
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #940 +/- ##
=======================================
Coverage ? 93.83%
=======================================
Files ? 16
Lines ? 1607
Branches ? 337
=======================================
Hits ? 1508
Misses ? 23
Partials ? 76
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a new Work Items MCP tool to update an existing Azure DevOps work item comment via the 7.2-preview.4 comments endpoint, mirroring the existing “add comment” tool pattern.
Changes:
- Added
wit_update_work_item_commenttool registration and handler (PATCH to work item comment endpoint). - Added Jest tests covering success and error cases for the new tool.
- Updated toolset documentation to list and describe the new tool.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/tools/work-items.ts |
Registers wit_update_work_item_comment and implements the PATCH handler using the existing fetch/auth pattern. |
test/src/tools/work-items.test.ts |
Adds tests for the new tool’s success and failure paths. |
docs/TOOLSET.md |
Documents the new tool in the tool index and Work Items section. |
danhellem
left a comment
There was a problem hiding this comment.
Copilot made some good suggestions
e9132c4 to
84125ba
Compare
|
@danhellem Applied all the review feedback:
Ready for re-review whenever you get a chance. Thanks! |
|
@danhellem Friendly ping — all Copilot review feedback has been addressed (parameter renamed |
|
@tusagarwal you need to run |
|
@danhellem Done! Ran |
danhellem
left a comment
There was a problem hiding this comment.
Getting started.md should not be changed in this PR. Please remove it
Closes #932
Adds
wit_update_work_item_comment— updates an existing work item comment via PATCH on the7.2-preview.4comments endpoint. Same pattern as the existingwit_add_work_item_comment.Per @danhellem's feedback on #932, this is a clean PR with just the update tool (no delete).
Parameters
projectworkItemIdcommentIdwit_list_work_item_comments)textformatmarkdownorhtml(optional)Changes
src/tools/work-items.tswit_update_work_item_commenttoWORKITEM_TOOLSconstantadd_work_item_commenttest/src/tools/work-items.test.tsWhy
When AI agents add comments (RCA, deployment notes, etc.), typos happen. Right now the only option is adding another comment. The update tool lets you fix mistakes in-place.
✅ PR Checklist
🔧 How did you test it?
npm test -- test/src/tools/work-items.test.ts— 103 passed, 0 failednpm run format— no changes needed