MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / githubStatusScanItems

Function githubStatusScanItems

cmd/pad/cmd_github.go:510–526  ·  view source on GitHub ↗

githubStatusScanItems is every item of every collection, archived included, that `pad github status` scans for linked PRs. Every page of each collection is read (BUG-3793): a 100-row limit silently dropped the rest of a larger collection from the report. A collection that fails to list is skipped, a

(client *cli.Client, ws string)

Source from the content-addressed store, hash-verified

508// collection from the report. A collection that fails to list is skipped, as
509// before.
510func githubStatusScanItems(client *cli.Client, ws string) ([]models.Item, error) {
511 colls, err := client.ListCollections(ws)
512 if err != nil {
513 return nil, err
514 }
515 var items []models.Item
516 for _, coll := range colls {
517 collItems, err := client.ListAllCollectionItems(ws, coll.Slug, url.Values{
518 "include_archived": {"true"},
519 })
520 if err != nil {
521 continue
522 }
523 items = append(items, collItems...)
524 }
525 return items, nil
526}

Calls 3

appendFunction · 0.85
ListCollectionsMethod · 0.45