Add capability to filter codespaces by repo owner (#7347)

* Add capability to filter codespaces by repo owner

* Replace Flags with PersistentFlags

* Reword flag description

* Update test seed

* Add mutual exclusion

---------

Co-authored-by: Caleb Brose <5447118+cmbrose@users.noreply.github.com>
This commit is contained in:
Kousik Mitra 2023-04-27 21:12:08 +05:30 committed by GitHub
parent 50e16890f8
commit d0207a2ede
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 146 additions and 38 deletions

View file

@ -128,11 +128,18 @@ func (a *API) GetUser(ctx context.Context) (*User, error) {
return &response, nil
}
// RepositoryOwner represents owner of a repository
type RepositoryOwner struct {
Type string `json:"type"`
Login string `json:"login"`
}
// Repository represents a GitHub repository.
type Repository struct {
ID int `json:"id"`
FullName string `json:"full_name"`
DefaultBranch string `json:"default_branch"`
ID int `json:"id"`
FullName string `json:"full_name"`
DefaultBranch string `json:"default_branch"`
Owner RepositoryOwner `json:"owner"`
}
// GetRepository returns the repository associated with the given owner and name.