MCPcopy Index your code
hub / github.com/cli/cli / filterCodespacesByRepoOwner

Function filterCodespacesByRepoOwner

pkg/cmd/codespace/common.go:255–263  ·  view source on GitHub ↗

filterCodespacesByRepoOwner filters a list of codespaces by the owner of the repository.

(codespaces []*api.Codespace, repoOwner string)

Source from the content-addressed store, hash-verified

253
254// filterCodespacesByRepoOwner filters a list of codespaces by the owner of the repository.
255func filterCodespacesByRepoOwner(codespaces []*api.Codespace, repoOwner string) []*api.Codespace {
256 filtered := make([]*api.Codespace, 0, len(codespaces))
257 for _, c := range codespaces {
258 if strings.EqualFold(c.Repository.Owner.Login, repoOwner) {
259 filtered = append(filtered, c)
260 }
261 }
262 return filtered
263}

Callers 2

DeleteMethod · 0.85
fetchCodespacesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected