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
Copy file name to clipboardExpand all lines: pkg/github/pullrequests.go
+41-6Lines changed: 41 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1248,9 +1248,15 @@ func CreatePullRequest(getClient GetClientFn, t translations.TranslationHelperFu
1248
1248
}
1249
1249
1250
1250
// RequestCopilotReview creates a tool to request a Copilot review for a pull request.
1251
-
funcRequestCopilotReview(getClientGetClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
1251
+
// Note that this tool will not work on GHES where this feature is unsupported. In future, we should not expose this
1252
+
// tool if the configured host does not support it.
1253
+
funcRequestCopilotReview(getClientGetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, server.ToolHandlerFunc) {
1252
1254
returnmcp.NewTool("request_copilot_review",
1253
1255
mcp.WithDescription(t("TOOL_REQUEST_COPILOT_REVIEW_DESCRIPTION", "Request a GitHub Copilot review for a pull request. Note: This feature depends on GitHub API support and may not be available for all users.")),
// As of now, GitHub API does not support Copilot as a reviewer programmatically.
1282
-
// This is a placeholder for future support.
1283
-
returnmcp.NewToolResultError(fmt.Sprintf("Requesting a Copilot review for PR #%d in %s/%s is not currently supported by the GitHub API. Please request a Copilot review via the GitHub UI.", pullNumber, owner, repo)), nil
0 commit comments