Skip to content

Commit cdb00ca

Browse files
authored
repos: add back all fields except Langauge (#1290)
1 parent af9956c commit cdb00ca

File tree

1 file changed

+37
-2
lines changed

1 file changed

+37
-2
lines changed

cmd/src/repos.go

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
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

5152
const repositoryFragment = `
5253
fragment 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

6177
type 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

66101
type GitRef struct {

0 commit comments

Comments
 (0)