diff --git a/cmd/src/repos.go b/cmd/src/repos.go index d7131c6f87..c1347f5889 100644 --- a/cmd/src/repos.go +++ b/cmd/src/repos.go @@ -4,7 +4,6 @@ import ( "context" "flag" "fmt" - "time" "github.com/sourcegraph/sourcegraph/lib/errors" @@ -51,53 +50,17 @@ Use "src repos [command] -h" for more information about a command. const repositoryFragment = ` fragment RepositoryFields on Repository { - id name - url - description - language - createdAt - updatedAt - externalRepository { - id - serviceType - serviceID - } defaultBranch { name displayName } - viewerCanAdminister - keyValuePairs { - key - value - } } ` type Repository struct { - ID string `json:"id"` - Name string `json:"name"` - URL string `json:"url"` - Description string `json:"description"` - Language string `json:"language"` - CreatedAt time.Time `json:"createdAt"` - UpdatedAt *time.Time `json:"updatedAt"` - ExternalRepository ExternalRepository `json:"externalRepository"` - DefaultBranch GitRef `json:"defaultBranch"` - ViewerCanAdminister bool `json:"viewerCanAdminister"` - KeyValuePairs []KeyValuePair `json:"keyValuePairs"` -} - -type KeyValuePair struct { - Key string `json:"key"` - Value *string `json:"value"` -} - -type ExternalRepository struct { - ID string `json:"id"` - ServiceType string `json:"serviceType"` - ServiceID string `json:"serviceID"` + Name string `json:"name"` + DefaultBranch GitRef `json:"defaultBranch"` } type GitRef struct {