Skip to content
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'upstream/main' into feat/update-pull-re…
…quest-tool
  • Loading branch information
monotykamary committed Apr 8, 2025
commit c84e958017e2216b222c1045d3a453914f6627a0
10 changes: 5 additions & 5 deletions pkg/github/pullrequests.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ func GetPullRequest(client *github.Client, t translations.TranslationHelperFunc)
}
}

// updatePullRequest creates a tool to update an existing pull request.
func updatePullRequest(client *github.Client, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
// UpdatePullRequest creates a tool to update an existing pull request.
func UpdatePullRequest(client *github.Client, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
return mcp.NewTool("update_pull_request",
mcp.WithDescription(t("TOOL_UPDATE_PULL_REQUEST_DESCRIPTION", "Update an existing pull request in a GitHub repository")),
mcp.WithString("owner",
Expand Down Expand Up @@ -109,7 +109,7 @@ func updatePullRequest(client *github.Client, t translations.TranslationHelperFu
if err != nil {
return mcp.NewToolResultError(err.Error()), nil
}
pullNumber, err := requiredInt(request, "pullNumber")
pullNumber, err := RequiredInt(request, "pullNumber")
if err != nil {
return mcp.NewToolResultError(err.Error()), nil
}
Expand Down Expand Up @@ -180,8 +180,8 @@ func updatePullRequest(client *github.Client, t translations.TranslationHelperFu
}
}

// listPullRequests creates a tool to list and filter repository pull requests.
func listPullRequests(client *github.Client, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
// ListPullRequests creates a tool to list and filter repository pull requests.
func ListPullRequests(client *github.Client, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
return mcp.NewTool("list_pull_requests",
mcp.WithDescription(t("TOOL_LIST_PULL_REQUESTS_DESCRIPTION", "List and filter repository pull requests")),
mcp.WithString("owner",
Expand Down
10 changes: 5 additions & 5 deletions pkg/github/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ func NewServer(client *github.Client, version string, readOnly bool, t translati
s.AddTool(GetPullRequestComments(client, t))
s.AddTool(GetPullRequestReviews(client, t))
if !readOnly {
s.AddTool(mergePullRequest(client, t))
s.AddTool(updatePullRequestBranch(client, t))
s.AddTool(createPullRequestReview(client, t))
s.AddTool(createPullRequest(client, t))
s.AddTool(updatePullRequest(client, t))
s.AddTool(MergePullRequest(client, t))
s.AddTool(UpdatePullRequestBranch(client, t))
s.AddTool(CreatePullRequestReview(client, t))
s.AddTool(CreatePullRequest(client, t))
s.AddTool(UpdatePullRequest(client, t))
}

// Add GitHub tools - Repositories
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.