You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add `assign_copilot_to_issue_with_intent` in a new non-default toolset
`copilot_issue_intents`. The tool uses GraphQL's object-form
`assignees: [AssigneeUpdateInput!]` so intent metadata (rationale,
confidence, is_suggestion) is attached to the Copilot entry only, while
existing assignees are preserved.
- Reuses the existing Copilot actor lookup, target-repository
resolution, base_ref, custom_instructions, GraphQL-Features header,
and direct-assignment PR polling behavior.
- `is_suggestion: true` records a pending Copilot assignment intent,
returns a suggestion-shaped result, and does not launch Copilot or
poll for a linked PR.
- `rationale` is capped at 280 characters (schema + runtime);
`confidence` is validated against `LOW`/`MEDIUM`/`HIGH`.
- Toolset is non-default so its inputs do not add schema bloat to the
default tool surface; available via `copilot_issue_intents`,
`all`, or explicit tool selection.
Includes unit tests for direct assignment (with existing assignees and
with base_ref/custom_instructions), the suggestion path, invalid
rationale length, invalid confidence, and Copilot-not-available; a
generated toolsnap; regenerated docs; and an e2e test for the
suggestion path.
Refs: github/plan-track-agentic-toolkit#683
| <picture><sourcemedia="(prefers-color-scheme: dark)"srcset="pkg/octicons/icons/codescan-dark.png"><sourcemedia="(prefers-color-scheme: light)"srcset="pkg/octicons/icons/codescan-light.png"><imgsrc="pkg/octicons/icons/codescan-light.png"width="20"height="20"alt="codescan"></picture> |`code_security`| Code security related tools, such as GitHub Code Scanning |
592
592
| <picture><sourcemedia="(prefers-color-scheme: dark)"srcset="pkg/octicons/icons/copilot-dark.png"><sourcemedia="(prefers-color-scheme: light)"srcset="pkg/octicons/icons/copilot-light.png"><imgsrc="pkg/octicons/icons/copilot-light.png"width="20"height="20"alt="copilot"></picture> |`copilot`| Copilot related tools |
-**assign_copilot_to_issue_with_intent** - Assign Copilot to issue with intent
757
+
-**Required OAuth Scopes**: `repo`
758
+
-`base_ref`: Git reference (e.g., branch) that the agent will start its work from. If not specified, defaults to the repository's default branch. Ignored when is_suggestion is true (string, optional)
759
+
-`confidence`: How confident you are in this choice. 'HIGH' for clear signal or explicit user request, 'MEDIUM' for reasonable inference with some ambiguity, 'LOW' for best guess with limited signal. (string, optional)
760
+
-`custom_instructions`: Optional custom instructions to guide the agent beyond the issue body. Ignored when is_suggestion is true (string, optional)
761
+
-`is_suggestion`: If true, records a pending Copilot assignment intent rather than launching the agent. Approval later supplies the launch context; base_ref and custom_instructions are ignored in this case. (boolean, optional)
762
+
-`issue_number`: Issue number (number, required)
763
+
-`owner`: Repository owner (string, required)
764
+
-`rationale`: One concise sentence explaining what specifically about the issue led to choosing Copilot. State the concrete signal (e.g. 'Well-scoped task with clear acceptance criteria'). (string, optional)
| <picture><sourcemedia="(prefers-color-scheme: dark)"srcset="../pkg/octicons/icons/codescan-dark.png"><sourcemedia="(prefers-color-scheme: light)"srcset="../pkg/octicons/icons/codescan-light.png"><imgsrc="../pkg/octicons/icons/codescan-light.png"width="20"height="20"alt="codescan"></picture><br>`code_security`| Code security related tools, such as GitHub Code Scanning |https://api.githubcopilot.com/mcp/x/code_security|[Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-code_security&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fcode_security%22%7D)|[read-only](https://api.githubcopilot.com/mcp/x/code_security/readonly)|[Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-code_security&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fcode_security%2Freadonly%22%7D)|
27
27
| <picture><sourcemedia="(prefers-color-scheme: dark)"srcset="../pkg/octicons/icons/copilot-dark.png"><sourcemedia="(prefers-color-scheme: light)"srcset="../pkg/octicons/icons/copilot-light.png"><imgsrc="../pkg/octicons/icons/copilot-light.png"width="20"height="20"alt="copilot"></picture><br>`copilot`| Copilot related tools |https://api.githubcopilot.com/mcp/x/copilot|[Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-copilot&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fcopilot%22%7D)|[read-only](https://api.githubcopilot.com/mcp/x/copilot/readonly)|[Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-copilot&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fcopilot%2Freadonly%22%7D)|
require.True(t, ok, "expected content to be of type TextContent")
1188
+
1189
+
possibleExpectedFailure:="copilot isn't available as an assignee for this issue. Please inform the user to visit https://docs.github.com/en/copilot/using-github-copilot/using-copilot-coding-agent-to-work-on-tasks/about-assigning-tasks-to-copilot for more information."
t.Skip("skipping because copilot wasn't available as an assignee on this issue, it's likely that the owner doesn't have copilot enabled in their settings")
1192
+
}
1193
+
1194
+
require.False(t, resp.IsError, fmt.Sprintf("expected result not to be an error: %+v", resp))
1195
+
1196
+
varresponsemap[string]any
1197
+
require.NoError(t, json.Unmarshal([]byte(textContent.Text), &response), "expected suggestion result to be JSON")
1198
+
require.Equal(t, true, response["is_suggestion"], "expected is_suggestion=true in result")
0 commit comments