Add label support to update_pull_request tool #698
+131
−1
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.
This PR adds label management capability to the
update_pull_requesttool, completing the label management story for pull requests in the Azure DevOps MCP server.GitHub issue number
Fixes #697
Description
Added an optional
labelsparameter to theupdate_pull_requesttool that allows users to manage PR labels after creation. The implementation follows the same pattern as the existingcreate_pull_requesttool:undefined(not provided): Don't modify existing labels[](empty array): Remove all labels from the PR["label1", "label2"]: Replace existing labels with the specified onesChanges Made:
labelsparameter to theupdate_pull_requesttool schema (array of strings, optional)WebApiTagDefinition[]format when providedAssociated Risks
create_pull_request✅ PR Checklist
🧪 How did you test it?
Unit Tests: Added 3 comprehensive test cases covering all label scenarios:
Test Results: All 572 tests pass with 98.1% code coverage maintained
Manual Verification: The implementation follows the exact same pattern as the existing
create_pull_requesttool, which is already in production use.