diff --git a/.github/aw/github-mcp-server.md b/.github/aw/github-mcp-server.md index 43f92928851..8a42dd7bbec 100644 --- a/.github/aw/github-mcp-server.md +++ b/.github/aw/github-mcp-server.md @@ -2,7 +2,7 @@ **Source**: [github/github-mcp-server](https://github.com/github/github-mcp-server/tree/main/pkg/github) **Mapping File**: [pkg/workflow/data/github_toolsets_permissions.json](https://github.com/github/gh-aw/blob/main/pkg/workflow/data/github_toolsets_permissions.json) -**Last Updated**: 2026-08-02 +**Last Updated**: 2026-08-16 ## Overview @@ -69,6 +69,7 @@ When the GitHub tool is configured, gh-aw injects a separate `` | `code_quality` | Code quality finding lookups | | `code_security` | Code scanning alert management | | `copilot` | Copilot assignment, PR creation, and review requests | +| `copilot_issue_intents` | Intent-aware Copilot issue assignment | | `copilot_spaces` | GitHub Copilot Spaces (remote mode only) | | `dependabot` | Dependency vulnerability management | | `discussions` | Community discussion workflows | @@ -117,6 +118,15 @@ When the GitHub tool is configured, gh-aw injects a separate `` --- +### copilot_issue_intents +**Description**: Opt-in Copilot issue assignment tools with intent metadata + +| Tool | Purpose | Key Parameters | +|------|---------|----------------| +| `assign_copilot_to_issue_with_intent` | Assign Copilot to an issue with intent metadata | `owner`, `repo`, `issue_number`, `rationale`, `confidence`, `is_suggestion` | + +--- + ### copilot_spaces **Description**: GitHub Copilot Spaces (remote-only) @@ -140,6 +150,7 @@ When the GitHub tool is configured, gh-aw injects a separate `` | `delete_file` | Delete a file from a repository | `owner`, `repo`, `path`, `message`, `sha`, `branch` | | `fork_repository` | Fork a repository | `owner`, `repo`, `organization` | | `get_commit` | Get details of a specific commit | `owner`, `repo`, `sha` | +| `get_file_blame` | Get line-by-line blame information for a file | `owner`, `repo`, `path`, `ref` | | `get_file_contents` | Read file or directory contents | `owner`, `repo`, `path`, `ref` | | `get_latest_release` | Get the latest release for a repository | `owner`, `repo` | | `get_release_by_tag` | Get a release by its tag name | `owner`, `repo`, `tag` | @@ -184,13 +195,18 @@ When the GitHub tool is configured, gh-aw injects a separate `` ### issues **Description**: Issue management +> **Note**: `find_duplicate`, `issue_dependency_read`, and `issue_dependency_write` require their upstream feature flags to be enabled, independently of toolset selection. + | Tool | Purpose | Key Parameters | |------|---------|----------------| | `add_issue_comment` | Add a comment to an issue | `owner`, `repo`, `issue_number`, `body` | +| `find_duplicate` | Find likely duplicate issues for an existing issue | `owner`, `repo`, `issue_number`, `confidence_threshold` | +| `get_label` | Get details of a specific label | `owner`, `repo`, `name` | | `issue_dependency_read` | Read an issue's dependency relationships | `owner`, `repo`, `issue_number` | | `issue_dependency_write` | Add or remove issue dependencies | `owner`, `repo`, `issue_number` | | `issue_read` | Read issue details and comments | `owner`, `repo`, `issue_number` | | `issue_write` | Create or update an issue | `owner`, `repo`, `title`, `body`, `labels`, `assignees` | +| `list_issue_fields` | List available issue fields for a repository | `owner`, `repo` | | `list_issue_types` | List available issue types for a repository | `owner`, `repo` | | `list_issues` | List issues in a repository | `owner`, `repo`, `state`, `labels`, `page` | | `search_issues` | Search issues across GitHub | `query`, `page`, `per_page` | diff --git a/pkg/workflow/data/github_tool_to_toolset.json b/pkg/workflow/data/github_tool_to_toolset.json index d7f936a2ee4..b094885833b 100644 --- a/pkg/workflow/data/github_tool_to_toolset.json +++ b/pkg/workflow/data/github_tool_to_toolset.json @@ -20,6 +20,7 @@ "issue_dependency_read": "issues", "issue_dependency_write": "issues", + "find_duplicate": "issues", "issue_read": "issues", "list_issues": "issues", "create_issue": "issues", @@ -56,6 +57,7 @@ "assign_copilot_to_issue": "copilot", "create_pull_request_with_copilot": "copilot", "request_copilot_review": "copilot", + "assign_copilot_to_issue_with_intent": "copilot_issue_intents", "list_dependabot_alerts": "dependabot", "get_dependabot_alert": "dependabot", diff --git a/pkg/workflow/data/github_toolsets_permissions.json b/pkg/workflow/data/github_toolsets_permissions.json index 14d34acf9ce..be14766bc0f 100644 --- a/pkg/workflow/data/github_toolsets_permissions.json +++ b/pkg/workflow/data/github_toolsets_permissions.json @@ -1,6 +1,6 @@ { - "version": "2.4", - "description": "GitHub MCP server toolsets and their required permissions (synced to github/github-mcp-server main: restored semantic search, advisory, and secret scanning tools; search tools remain redistributed to repos/orgs/users/issues; experiments toolset removed; list_org_repository_security_advisories moved orgs->security_advisories; get_label dual-registered in issues; create_pull_request_with_copilot added)", + "version": "2.5", + "description": "GitHub MCP server toolsets and their required permissions (synced to github/github-mcp-server main: restored semantic search, advisory, and secret scanning tools; search tools remain redistributed to repos/orgs/users/issues; experiments toolset removed; list_org_repository_security_advisories moved orgs->security_advisories; get_label dual-registered in issues; create_pull_request_with_copilot added; find_duplicate added to issues; copilot_issue_intents added)", "toolsets": { "actions": { "description": "GitHub Actions workflows", @@ -32,6 +32,12 @@ "write_permissions": ["issues", "pull-requests"], "tools": ["assign_copilot_to_issue", "create_pull_request_with_copilot", "request_copilot_review"] }, + "copilot_issue_intents": { + "description": "Opt-in Copilot issue assignment tools with intent metadata", + "read_permissions": [], + "write_permissions": ["issues"], + "tools": ["assign_copilot_to_issue_with_intent"] + }, "copilot_spaces": { "description": "GitHub Copilot Spaces (remote-only)", "read_permissions": [], @@ -74,6 +80,7 @@ "write_permissions": ["issues"], "tools": [ "add_issue_comment", + "find_duplicate", "get_label", "issue_dependency_read", "issue_dependency_write", diff --git a/pkg/workflow/github_tool_to_toolset_test.go b/pkg/workflow/github_tool_to_toolset_test.go index ff480f52452..66db56c7103 100644 --- a/pkg/workflow/github_tool_to_toolset_test.go +++ b/pkg/workflow/github_tool_to_toolset_test.go @@ -100,6 +100,12 @@ func TestValidateGitHubToolsAgainstToolsets(t *testing.T) { enabledToolsets: []string{"actions"}, expectError: false, }, + { + name: "assign_copilot_to_issue_with_intent belongs to copilot_issue_intents toolset", + allowedTools: []string{"assign_copilot_to_issue_with_intent"}, + enabledToolsets: []string{"copilot_issue_intents"}, + expectError: false, + }, { name: "Actions toolset missing", allowedTools: []string{"actions_list", "actions_get"}, @@ -291,7 +297,7 @@ func TestGitHubToolToToolsetMap_Completeness(t *testing.T) { // Verify that the map contains entries for all expected tool categories expectedToolsets := []string{ "context", "repos", "issues", "pull_requests", "actions", - "code_quality", "code_security", "copilot", "discussions", "gists", "labels", + "code_quality", "code_security", "copilot", "copilot_issue_intents", "discussions", "gists", "labels", "notifications", "orgs", "users", "secret_protection", "security_advisories", } @@ -364,6 +370,20 @@ func TestGitHubToolToToolsetMap_ConsistencyWithDocumentation(t *testing.T) { } } +func TestGitHubToolToToolsetMap_NewGitHubMCPTools(t *testing.T) { + expectedMappings := map[string]string{ + "assign_copilot_to_issue_with_intent": "copilot_issue_intents", + "find_duplicate": "issues", + } + + toolToToolsetMap := loadGitHubToolToToolsetMap(t) + for tool, expectedToolset := range expectedMappings { + if actualToolset := toolToToolsetMap[tool]; actualToolset != expectedToolset { + t.Errorf("Tool %q: expected toolset %q, got %q", tool, expectedToolset, actualToolset) + } + } +} + func loadGitHubToolToToolsetMap(t *testing.T) map[string]string { t.Helper() diff --git a/pkg/workflow/permissions_validator_test.go b/pkg/workflow/permissions_validator_test.go index 48f02ebcef7..f952b9335ba 100644 --- a/pkg/workflow/permissions_validator_test.go +++ b/pkg/workflow/permissions_validator_test.go @@ -354,7 +354,11 @@ func TestToolsetPermissionsMapping_RestoredGitHubMCPTools(t *testing.T) { }{ { toolset: "issues", - tools: []string{"semantic_issue_similarity_search", "semantic_issues_search"}, + tools: []string{"find_duplicate", "semantic_issue_similarity_search", "semantic_issues_search"}, + }, + { + toolset: "copilot_issue_intents", + tools: []string{"assign_copilot_to_issue_with_intent"}, }, { toolset: "secret_protection",