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 initial support for multi-tool workflows#685

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
mattdholloway merged 13 commits intomainfrommulti-tool-workflows
Jul 30, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
13 commits
Select commitHold shift + click to select a range
f069f36
initial workflows
mattdhollowayJul 16, 2025
7b69e9e
Merge branch 'main' into multi-tool-workflows
mattdhollowayJul 22, 2025
a00aa4d
fixing tabs
mattdhollowayJul 22, 2025
75bfae4
remove unused SecurityAlertWorkflowPrompt and RepositorySetupWorkflow…
mattdhollowayJul 22, 2025
0291916
Merge branch 'main' into multi-tool-workflows
mattdhollowayJul 23, 2025
8c38bf8
add workflow prompt for creating issue and assigning to copilot
mattdhollowayJul 24, 2025
5b65f78
Merge branch 'main' into multi-tool-workflows
mattdhollowayJul 24, 2025
7938497
Update pkg/github/workflow_prompts.go
mattdhollowayJul 25, 2025
ec6aa20
remove notif triage
mattdhollowayJul 30, 2025
485decb
Merge branch 'main' into multi-tool-workflows
mattdhollowayJul 30, 2025
7234318
remove code inv workflow tool
mattdhollowayJul 30, 2025
bcccfe0
Merge branch 'multi-tool-workflows' of https://github.com/github/gith…
mattdhollowayJul 30, 2025
f1e5328
rm another
mattdhollowayJul 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletionpkg/github/tools.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -63,7 +63,10 @@ func DefaultToolsetGroup(readOnly bool, getClient GetClientFn, getGQLClient GetG
toolsets.NewServerTool(AddSubIssue(getClient,t)),
toolsets.NewServerTool(RemoveSubIssue(getClient,t)),
toolsets.NewServerTool(ReprioritizeSubIssue(getClient,t)),
).AddPrompts(toolsets.NewServerPrompt(AssignCodingAgentPrompt(t)))
).AddPrompts(
toolsets.NewServerPrompt(AssignCodingAgentPrompt(t)),
toolsets.NewServerPrompt(IssueToFixWorkflowPrompt(t)),
)
users:=toolsets.NewToolset("users","GitHub User related tools").
AddReadTools(
toolsets.NewServerTool(SearchUsers(getClient,t)),
Expand Down
77 changes: 77 additions & 0 deletionspkg/github/workflow_prompts.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
package github

import (
"context"
"fmt"

"github.com/github/github-mcp-server/pkg/translations"
"github.com/mark3labs/mcp-go/mcp"
"github.com/mark3labs/mcp-go/server"
)

// IssueToFixWorkflowPrompt provides a guided workflow for creating an issue and then generating a PR to fix it
funcIssueToFixWorkflowPrompt(t translations.TranslationHelperFunc) (tool mcp.Prompt,handler server.PromptHandlerFunc) {
returnmcp.NewPrompt("IssueToFixWorkflow",
mcp.WithPromptDescription(t("PROMPT_ISSUE_TO_FIX_WORKFLOW_DESCRIPTION","Create an issue for a problem and then generate a pull request to fix it")),
mcp.WithArgument("owner",mcp.ArgumentDescription("Repository owner"),mcp.RequiredArgument()),
mcp.WithArgument("repo",mcp.ArgumentDescription("Repository name"),mcp.RequiredArgument()),
mcp.WithArgument("title",mcp.ArgumentDescription("Issue title"),mcp.RequiredArgument()),
mcp.WithArgument("description",mcp.ArgumentDescription("Issue description"),mcp.RequiredArgument()),
mcp.WithArgument("labels",mcp.ArgumentDescription("Comma-separated list of labels to apply (optional)")),
mcp.WithArgument("assignees",mcp.ArgumentDescription("Comma-separated list of assignees (optional)")),
),func(_ context.Context,request mcp.GetPromptRequest) (*mcp.GetPromptResult,error) {
owner:=request.Params.Arguments["owner"]
repo:=request.Params.Arguments["repo"]
title:=request.Params.Arguments["title"]
description:=request.Params.Arguments["description"]

labels:=""
ifl,exists:=request.Params.Arguments["labels"];exists {
labels=fmt.Sprintf("%v",l)
}

assignees:=""
ifa,exists:=request.Params.Arguments["assignees"];exists {
assignees=fmt.Sprintf("%v",a)
}

messages:= []mcp.PromptMessage{
{
Role:"system",
Content:mcp.NewTextContent("You are a development workflow assistant helping to create GitHub issues and generate corresponding pull requests to fix them. You should: 1) Create a well-structured issue with clear problem description, 2) Assign it to Copilot coding agent to generate a solution, and 3) Monitor the PR creation process."),
},
{
Role:"user",
Content:mcp.NewTextContent(fmt.Sprintf("I need to create an issue titled '%s' in %s/%s and then have a PR generated to fix it. The issue description is: %s%s%s",
title,owner,repo,description,
func()string {
iflabels!="" {
returnfmt.Sprintf("\n\nLabels to apply: %s",labels)
}
return""
}(),
func()string {
ifassignees!="" {
returnfmt.Sprintf("\nAssignees: %s",assignees)
}
return""
}())),
},
{
Role:"assistant",
Content:mcp.NewTextContent(fmt.Sprintf("I'll help you create the issue '%s' in %s/%s and then coordinate with Copilot to generate a fix. Let me start by creating the issue with the provided details.",title,owner,repo)),
},
{
Role:"user",
Content:mcp.NewTextContent("Perfect! Please:\n1. Create the issue with the title, description, labels, and assignees\n2. Once created, assign it to Copilot coding agent to generate a solution\n3. Monitor the process and let me know when the PR is ready for review"),
},
{
Role:"assistant",
Content:mcp.NewTextContent("Excellent plan! Here's what I'll do:\n\n1. ✅ Create the issue with all specified details\n2. 🤖 Assign to Copilot coding agent for automated fix\n3. 📋 Monitor progress and notify when PR is created\n4. 🔍 Provide PR details for your review\n\nLet me start by creating the issue."),
},
}
return&mcp.GetPromptResult{
Messages:messages,
},nil
}
}
Loading

[8]ページ先頭

©2009-2025 Movatter.jp