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)
| 508 | // collection from the report. A collection that fails to list is skipped, as |
| 509 | // before. |
| 510 | func 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 | } |