MCPcopy Create free account
hub / github.com/cli/cli / ExportData

Method ExportData

pkg/cmd/project/shared/queries/queries.go:268–289  ·  view source on GitHub ↗
(_ []string)

Source from the content-addressed store, hash-verified

266}
267
268func (p Project) ExportData(_ []string) map[string]interface{} {
269 return map[string]interface{}{
270 "number": p.Number,
271 "url": p.URL,
272 "shortDescription": p.ShortDescription,
273 "public": p.Public,
274 "closed": p.Closed,
275 "title": p.Title,
276 "id": p.ID,
277 "readme": p.Readme,
278 "items": map[string]interface{}{
279 "totalCount": p.Items.TotalCount,
280 },
281 "fields": map[string]interface{}{
282 "totalCount": p.Fields.TotalCount,
283 },
284 "owner": map[string]interface{}{
285 "type": p.OwnerType(),
286 "login": p.OwnerLogin(),
287 },
288 }
289}
290
291func (p Project) OwnerType() string {
292 return p.Owner.TypeName

Callers 2

TestJSONProject_UserFunction · 0.95
TestJSONProject_OrgFunction · 0.95

Calls 2

OwnerTypeMethod · 0.95
OwnerLoginMethod · 0.95

Tested by 2

TestJSONProject_UserFunction · 0.76
TestJSONProject_OrgFunction · 0.76