File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 "context"
55 "flag"
66 "fmt"
7+ "time"
78
89 "github.com/sourcegraph/sourcegraph/lib/errors"
910
@@ -50,17 +51,53 @@ Use "src repos [command] -h" for more information about a command.
5051
5152const repositoryFragment = `
5253fragment RepositoryFields on Repository {
54+ id
5355 name
56+ url
57+ description
58+ language
59+ createdAt
60+ updatedAt
61+ externalRepository {
62+ id
63+ serviceType
64+ serviceID
65+ }
5466 defaultBranch {
5567 name
5668 displayName
5769 }
70+ viewerCanAdminister
71+ keyValuePairs {
72+ key
73+ value
74+ }
5875}
5976`
6077
6178type Repository struct {
62- Name string `json:"name"`
63- DefaultBranch GitRef `json:"defaultBranch"`
79+ ID string `json:"id"`
80+ Name string `json:"name"`
81+ URL string `json:"url"`
82+ Description string `json:"description"`
83+ Language string `json:"language"`
84+ CreatedAt time.Time `json:"createdAt"`
85+ UpdatedAt * time.Time `json:"updatedAt"`
86+ ExternalRepository ExternalRepository `json:"externalRepository"`
87+ DefaultBranch GitRef `json:"defaultBranch"`
88+ ViewerCanAdminister bool `json:"viewerCanAdminister"`
89+ KeyValuePairs []KeyValuePair `json:"keyValuePairs"`
90+ }
91+
92+ type KeyValuePair struct {
93+ Key string `json:"key"`
94+ Value * string `json:"value"`
95+ }
96+
97+ type ExternalRepository struct {
98+ ID string `json:"id"`
99+ ServiceType string `json:"serviceType"`
100+ ServiceID string `json:"serviceID"`
64101}
65102
66103type GitRef struct {
You can’t perform that action at this time.
0 commit comments