MCPcopy
hub / github.com/github/github-mcp-server / splitPullRequestReviewers

Function splitPullRequestReviewers

pkg/github/pullrequests_granular.go:358–372  ·  view source on GitHub ↗
(reviewers []string)

Source from the content-addressed store, hash-verified

356}
357
358func splitPullRequestReviewers(reviewers []string) ([]string, []string) {
359 userReviewers := make([]string, 0, len(reviewers))
360 teamReviewers := make([]string, 0)
361
362 for _, reviewer := range reviewers {
363 org, team, ok := strings.Cut(reviewer, "/")
364 if ok && org != "" && team != "" && !strings.Contains(team, "/") {
365 teamReviewers = append(teamReviewers, team)
366 continue
367 }
368 userReviewers = append(userReviewers, reviewer)
369 }
370
371 return userReviewers, teamReviewers
372}
373
374// GranularCreatePullRequestReview creates a tool to create a PR review.
375func GranularCreatePullRequestReview(t translations.TranslationHelperFunc) inventory.ServerTool {

Callers 3

CreatePullRequestFunction · 0.85
UpdatePullRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected