Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
JoannaaKL merged 2 commits intomainfromassign-copilot-prompt
Jun 24, 2025
Merged

Conversation

SamMorrowDrums
Copy link
Collaborator

@SamMorrowDrumsSamMorrowDrums commentedJun 24, 2025
edited
Loading

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.

  • Adds first Prompt to the codebase
  • Adds Prompt support to toolsets.

Example

Rendered prompt

--SYSTEMYou are a personal assistant for GitHub the Copilot GitHub Coding Agent. Your task is to help the user assign tasks to the Coding Agent based on their open GitHub issues. You can use assign_copilot_to_issue tool to assign the Coding Agent to issues that are suitable for autonomous work, and search_issues tool to find issues that match the user's criteria. You can also use list_issues to get a list of issues in the repository.--USERPlease go and get a list of the most recent 10 issues from the SamMorrowDrums/pigs-facts GitHub repository--ASSISTANTSure! I will get a list of the 10 most recent issues for the repo SamMorrowDrums/pigs-facts.--USERFor each issue, please check if it is a clearly defined coding task with acceptance criteria and a low to medium complexity to identify issues that are suitable for an AI Coding Agent to work on. Then assign each of the identified issues to Copilot.--ASSISTANTCertainly! Let me carefully check which ones are clearly scoped issues that are good to assign to the coding agent, and I will assign them now.--USERGreat, if you are unsure if an issue is good to assign, ask me first, rather than assigning copilot. If you are certain the issue is clear and suitable you can assign it to Copilot without asking.

After listing issues, it proceeds to do exactly as hoped

image

image

@CopilotCopilotAI review requested due to automatic review settingsJune 24, 2025 08:20
@SamMorrowDrumsSamMorrowDrums requested a review froma team as acode ownerJune 24, 2025 08:20
Copy link
Contributor

@CopilotCopilotAI left a 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.

  • IntroducesServerPrompt type and prompt registration methods in the toolset.
  • Registers the new prompt in the default GitHub “issues” toolset.
  • Implements theAssignCodingAgentPrompt function and its handler inissues.go.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

FileDescription
pkg/toolsets/toolsets.goAddedServerPrompt,NewServerPrompt, prompt storage, and registration methods.
pkg/github/tools.goChainedAddPrompts to include the newAssignCodingAgentPrompt.
pkg/github/issues.goDefinedAssignCodingAgentPrompt with messages and handler logic.
Comments suppressed due to low confidence (6)

pkg/toolsets/toolsets.go:43

  • Add a Go doc comment aboveNewServerPrompt to 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 theServerPrompt type 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 forAddPrompts to clarify that it registers one or more prompts on the toolset.
func (t *Toolset) AddPrompts(prompts ...ServerPrompt) *Toolset {

pkg/toolsets/toolsets.go:138

  • DocumentRegisterPrompts, 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 IDAssignCodingAgent uses 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 newAssignCodingAgentPrompt function 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) {

SamMorrowDrumsand others added2 commitsJune 24, 2025 14:48
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@JoannaaKLJoannaaKL merged commit21389a4 intomainJun 24, 2025
16 checks passed
@JoannaaKLJoannaaKL deleted the assign-copilot-prompt branchJune 24, 2025 12:52
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@JoannaaKLJoannaaKLJoannaaKL approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@SamMorrowDrums@JoannaaKL

[8]ページ先頭

©2009-2025 Movatter.jp