MCPcopy Create free account
hub / github.com/cli/cli / extractTeamSlugs

Function extractTeamSlugs

api/queries_pr_review.go:691–701  ·  view source on GitHub ↗

extractTeamSlugs extracts just the slug portion from team identifiers. Team identifiers can be in "org/slug" format; this returns just the slug.

(teams []string)

Source from the content-addressed store, hash-verified

689// extractTeamSlugs extracts just the slug portion from team identifiers.
690// Team identifiers can be in "org/slug" format; this returns just the slug.
691func extractTeamSlugs(teams []string) []string {
692 slugs := make([]string, 0, len(teams))
693 for _, t := range teams {
694 if t == "" {
695 continue
696 }
697 s := strings.SplitN(t, "/", 2)
698 slugs = append(slugs, s[len(s)-1])
699 }
700 return slugs
701}
702
703// toGitHubV4Strings converts a string slice to a githubv4.String slice,
704// optionally appending a suffix to each element.

Callers 2

AddPullRequestReviewsFunction · 0.85
RemovePullRequestReviewsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected