-
Notifications
You must be signed in to change notification settings - Fork 3k
Add in an assign copilot prompt #572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for registering and handling a new “AssignCodingAgent” prompt alongside existing tools, enabling users to assign multiple GitHub issues to the Copilot Coding Agent in bulk.
- Introduces
ServerPrompttype and prompt registration methods in the toolset. - Registers the new prompt in the default GitHub “issues” toolset.
- Implements the
AssignCodingAgentPromptfunction and its handler inissues.go.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| pkg/toolsets/toolsets.go | Added ServerPrompt, NewServerPrompt, prompt storage, and registration methods. |
| pkg/github/tools.go | Chained AddPrompts to include the new AssignCodingAgentPrompt. |
| pkg/github/issues.go | Defined AssignCodingAgentPrompt with messages and handler logic. |
Comments suppressed due to low confidence (6)
pkg/toolsets/toolsets.go:43
- Add a Go doc comment above
NewServerPromptto describe its purpose and usage.
func NewServerPrompt(prompt mcp.Prompt, handler server.PromptHandlerFunc) ServerPrompt {
pkg/toolsets/toolsets.go:56
- Add a Go doc comment for the
ServerPrompttype to explain its fields and intended use.
// ServerPrompt represents a prompt that can be registered with the MCP server.
pkg/toolsets/toolsets.go:113
- Add a Go doc comment for
AddPromptsto clarify that it registers one or more prompts on the toolset.
func (t *Toolset) AddPrompts(prompts ...ServerPrompt) *Toolset {
pkg/toolsets/toolsets.go:138
- Document
RegisterPrompts, noting that it registers all added prompts on the MCP server when the toolset is enabled.
func (t *Toolset) RegisterPrompts(s *server.MCPServer) {
pkg/github/issues.go:936
- [nitpick] The prompt ID
AssignCodingAgentuses PascalCase; for consistency with snake_case tool IDs (e.g.,assign_copilot_to_issue), consider usingassign_coding_agent.
return mcp.NewPrompt("AssignCodingAgent",
pkg/github/issues.go:935
- There are no unit tests for the new
AssignCodingAgentPromptfunction or its handler; consider adding tests to verify the generated message sequence and parameter validation.
func AssignCodingAgentPrompt(t translations.TranslationHelperFunc) (tool mcp.Prompt, handler server.PromptHandlerFunc) {
Co-authored-by: Copilot <[email protected]>
ce77820 to
a00617b
Compare
* add in an assign copilot prompt * Update pkg/github/issues.go Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
This PR adds a prompt that assigns the Coding Agent to multiple tasks in a specified GitHub repository, validating first if they are clear enough to assign.
Example
Rendered prompt
After listing issues, it proceeds to do exactly as hoped