Skip to content

Commit 095bb42

Browse files
committed
Enhance update_issue_labels tool with method options and improved descriptions
1 parent a378370 commit 095bb42

5 files changed

Lines changed: 640 additions & 76 deletions

File tree

docs/feature-flags.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ runtime behavior (such as output formatting) won't appear here.
153153
- **update_issue_labels** - Update Issue Labels
154154
- **Required OAuth Scopes**: `repo`
155155
- `issue_number`: The issue number to update (number, required)
156-
- `labels`: Labels to apply to this issue. ([], required)
156+
- `labels`: Labels to apply to this issue. For 'remove', only each label's name is used. The 'rationale', 'confidence', and 'is_suggestion' fields are only honored when method is 'replace'. ([], required)
157+
- `method`: How to apply the labels: 'replace' (default) sets the issue's labels to exactly the provided list, 'add' adds them while keeping the existing labels, and 'remove' removes the named labels without affecting the others. (string, optional)
157158
- `owner`: Repository owner (username or organization) (string, required)
158159
- `repo`: Repository name (string, required)
159160

pkg/github/__toolsnaps__/update_issue_labels.snap

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"openWorldHint": true,
55
"title": "Update Issue Labels"
66
},
7-
"description": "Update the labels of an existing issue. This replaces the current labels with the provided list. When setting values, include a confidence level (LOW, MEDIUM, or HIGH) reflecting how certain you are about the choice.",
7+
"description": "Manage the labels on an existing issue. Use method 'replace' (default) to set the issue's labels to exactly the provided list, 'add' to add labels without removing existing ones, or 'remove' to remove specific labels without touching the rest. When setting values, include a confidence level (LOW, MEDIUM, or HIGH) reflecting how certain you are about the choice.",
88
"inputSchema": {
99
"properties": {
1010
"issue_number": {
@@ -13,7 +13,7 @@
1313
"type": "number"
1414
},
1515
"labels": {
16-
"description": "Labels to apply to this issue.",
16+
"description": "Labels to apply to this issue. For 'remove', only each label's name is used. The 'rationale', 'confidence', and 'is_suggestion' fields are only honored when method is 'replace'.",
1717
"items": {
1818
"oneOf": [
1919
{
@@ -54,6 +54,16 @@
5454
},
5555
"type": "array"
5656
},
57+
"method": {
58+
"default": "replace",
59+
"description": "How to apply the labels: 'replace' (default) sets the issue's labels to exactly the provided list, 'add' adds them while keeping the existing labels, and 'remove' removes the named labels without affecting the others.",
60+
"enum": [
61+
"replace",
62+
"add",
63+
"remove"
64+
],
65+
"type": "string"
66+
},
5767
"owner": {
5868
"description": "Repository owner (username or organization)",
5969
"type": "string"

0 commit comments

Comments
 (0)