File tree Expand file tree Collapse file tree 1 file changed +37
-2
lines changed
Expand file tree Collapse file tree 1 file changed +37
-2
lines changed 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,51 @@ 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+ createdAt
59+ updatedAt
60+ externalRepository {
61+ id
62+ serviceType
63+ serviceID
64+ }
5465 defaultBranch {
5566 name
5667 displayName
5768 }
69+ viewerCanAdminister
70+ keyValuePairs {
71+ key
72+ value
73+ }
5874}
5975`
6076
6177type Repository struct {
62- Name string `json:"name"`
63- DefaultBranch GitRef `json:"defaultBranch"`
78+ ID string `json:"id"`
79+ Name string `json:"name"`
80+ URL string `json:"url"`
81+ Description string `json:"description"`
82+ CreatedAt time.Time `json:"createdAt"`
83+ UpdatedAt * time.Time `json:"updatedAt"`
84+ ExternalRepository ExternalRepository `json:"externalRepository"`
85+ DefaultBranch GitRef `json:"defaultBranch"`
86+ ViewerCanAdminister bool `json:"viewerCanAdminister"`
87+ KeyValuePairs []KeyValuePair `json:"keyValuePairs"`
88+ }
89+
90+ type KeyValuePair struct {
91+ Key string `json:"key"`
92+ Value * string `json:"value"`
93+ }
94+
95+ type ExternalRepository struct {
96+ ID string `json:"id"`
97+ ServiceType string `json:"serviceType"`
98+ ServiceID string `json:"serviceID"`
6499}
65100
66101type GitRef struct {
You can’t perform that action at this time.
0 commit comments