From 308bfcaccf93a2f383674ae4a4ca8107f8ee28e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6khan=20Arkan?= Date: Wed, 13 May 2026 16:18:22 +0300 Subject: [PATCH] Annotate granular update_issue tools as destructive Sets destructiveHint: true on the seven granular update_issue_* tools (title, body, assignees, labels, milestone, state, type) so the IFC client engine can apply egress policies before invocation. The unified issue_write tool is covered separately by #2470. Refs github/copilot-mcp-core#1623. --- pkg/github/__toolsnaps__/update_issue_assignees.snap | 2 +- pkg/github/__toolsnaps__/update_issue_body.snap | 2 +- pkg/github/__toolsnaps__/update_issue_labels.snap | 2 +- pkg/github/__toolsnaps__/update_issue_milestone.snap | 2 +- pkg/github/__toolsnaps__/update_issue_state.snap | 2 +- pkg/github/__toolsnaps__/update_issue_title.snap | 2 +- pkg/github/__toolsnaps__/update_issue_type.snap | 2 +- pkg/github/issues_granular.go | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pkg/github/__toolsnaps__/update_issue_assignees.snap b/pkg/github/__toolsnaps__/update_issue_assignees.snap index 9c7261c9aa..29149b6c39 100644 --- a/pkg/github/__toolsnaps__/update_issue_assignees.snap +++ b/pkg/github/__toolsnaps__/update_issue_assignees.snap @@ -1,6 +1,6 @@ { "annotations": { - "destructiveHint": false, + "destructiveHint": true, "openWorldHint": true, "title": "Update Issue Assignees" }, diff --git a/pkg/github/__toolsnaps__/update_issue_body.snap b/pkg/github/__toolsnaps__/update_issue_body.snap index c54d69172a..7d42ddb2b7 100644 --- a/pkg/github/__toolsnaps__/update_issue_body.snap +++ b/pkg/github/__toolsnaps__/update_issue_body.snap @@ -1,6 +1,6 @@ { "annotations": { - "destructiveHint": false, + "destructiveHint": true, "openWorldHint": true, "title": "Update Issue Body" }, diff --git a/pkg/github/__toolsnaps__/update_issue_labels.snap b/pkg/github/__toolsnaps__/update_issue_labels.snap index 3acf98d93f..4b930b14d7 100644 --- a/pkg/github/__toolsnaps__/update_issue_labels.snap +++ b/pkg/github/__toolsnaps__/update_issue_labels.snap @@ -1,6 +1,6 @@ { "annotations": { - "destructiveHint": false, + "destructiveHint": true, "openWorldHint": true, "title": "Update Issue Labels" }, diff --git a/pkg/github/__toolsnaps__/update_issue_milestone.snap b/pkg/github/__toolsnaps__/update_issue_milestone.snap index 9188779f0a..221fafc19c 100644 --- a/pkg/github/__toolsnaps__/update_issue_milestone.snap +++ b/pkg/github/__toolsnaps__/update_issue_milestone.snap @@ -1,6 +1,6 @@ { "annotations": { - "destructiveHint": false, + "destructiveHint": true, "openWorldHint": true, "title": "Update Issue Milestone" }, diff --git a/pkg/github/__toolsnaps__/update_issue_state.snap b/pkg/github/__toolsnaps__/update_issue_state.snap index b14d737b7d..0af217d37e 100644 --- a/pkg/github/__toolsnaps__/update_issue_state.snap +++ b/pkg/github/__toolsnaps__/update_issue_state.snap @@ -1,6 +1,6 @@ { "annotations": { - "destructiveHint": false, + "destructiveHint": true, "openWorldHint": true, "title": "Update Issue State" }, diff --git a/pkg/github/__toolsnaps__/update_issue_title.snap b/pkg/github/__toolsnaps__/update_issue_title.snap index 825fab0655..9fe8054bb3 100644 --- a/pkg/github/__toolsnaps__/update_issue_title.snap +++ b/pkg/github/__toolsnaps__/update_issue_title.snap @@ -1,6 +1,6 @@ { "annotations": { - "destructiveHint": false, + "destructiveHint": true, "openWorldHint": true, "title": "Update Issue Title" }, diff --git a/pkg/github/__toolsnaps__/update_issue_type.snap b/pkg/github/__toolsnaps__/update_issue_type.snap index 237603a6ed..12c734e0b0 100644 --- a/pkg/github/__toolsnaps__/update_issue_type.snap +++ b/pkg/github/__toolsnaps__/update_issue_type.snap @@ -1,6 +1,6 @@ { "annotations": { - "destructiveHint": false, + "destructiveHint": true, "openWorldHint": true, "title": "Update Issue Type" }, diff --git a/pkg/github/issues_granular.go b/pkg/github/issues_granular.go index 973032c4ab..8ad9ae4ef8 100644 --- a/pkg/github/issues_granular.go +++ b/pkg/github/issues_granular.go @@ -53,7 +53,7 @@ func issueUpdateTool( Annotations: &mcp.ToolAnnotations{ Title: t("TOOL_"+strings.ToUpper(name)+"_USER_TITLE", title), ReadOnlyHint: false, - DestructiveHint: jsonschema.Ptr(false), + DestructiveHint: jsonschema.Ptr(true), OpenWorldHint: jsonschema.Ptr(true), }, InputSchema: &jsonschema.Schema{ @@ -332,7 +332,7 @@ func GranularUpdateIssueType(t translations.TranslationHelperFunc) inventory.Ser Annotations: &mcp.ToolAnnotations{ Title: t("TOOL_UPDATE_ISSUE_TYPE_USER_TITLE", "Update Issue Type"), ReadOnlyHint: false, - DestructiveHint: jsonschema.Ptr(false), + DestructiveHint: jsonschema.Ptr(true), OpenWorldHint: jsonschema.Ptr(true), }, InputSchema: &jsonschema.Schema{