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

Function validateNWO

pkg/cmd/codespace/common.go:256–259  ·  view source on GitHub ↗

validateNWO returns an error if nwo is not a valid "owner/repo" repository reference.

(nwo string)

Source from the content-addressed store, hash-verified

254
255// validateNWO returns an error if nwo is not a valid "owner/repo" repository reference.
256func validateNWO(nwo string) error {
257 _, _, err := safeurl.RepoPartsFromNWO(nwo)
258 return err
259}
260
261// filterCodespacesByRepoOwner filters a list of codespaces by the owner of the repository.
262func filterCodespacesByRepoOwner(codespaces []*api.Codespace, repoOwner string) []*api.Codespace {

Callers 2

newCreateCmdFunction · 0.85
newListCmdFunction · 0.85

Calls 1

RepoPartsFromNWOFunction · 0.92

Tested by

no test coverage detected