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

Function artifactsPage

pkg/cmd/issue/artifact/client/client_test.go:846–857  ·  view source on GitHub ↗

artifactsPage responds with a page holding an artifact for each number.

(artifactNumbers ...int)

Source from the content-addressed store, hash-verified

844
845// artifactsPage responds with a page holding an artifact for each number.
846func artifactsPage(artifactNumbers ...int) httpmock.Responder {
847 page := make([]map[string]any, 0, len(artifactNumbers))
848 for _, n := range artifactNumbers {
849 page = append(page, map[string]any{
850 "id": 6600 + n,
851 "number": n,
852 "type": "generic",
853 "name": fmt.Sprintf("Artifact %d", n),
854 })
855 }
856 return httpmock.JSONResponse(page)
857}
858
859// numbers returns the numbers from first to last.
860func numbers(first, last int) []int {

Callers 1

TestListFunction · 0.85

Calls 1

JSONResponseFunction · 0.92

Tested by

no test coverage detected