Skip to content

Commit b0cf80c

Browse files
committed
Revert "repos: remove unread fields from graphql query (#1288)"
This reverts commit 81ef50c.
1 parent 81ef50c commit b0cf80c

1 file changed

Lines changed: 39 additions & 2 deletions

File tree

cmd/src/repos.go

Lines changed: 39 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,53 @@ 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+
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

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

66103
type GitRef struct {

0 commit comments

Comments
 (0)