MCPcopy Index your code
hub / github.com/cli/cli / mockIssueNumberGet

Function mockIssueNumberGet

pkg/cmd/issue/edit/edit_test.go:1279–1299  ·  view source on GitHub ↗
(_ *testing.T, reg *httpmock.Registry, number int)

Source from the content-addressed store, hash-verified

1277}
1278
1279func mockIssueNumberGet(_ *testing.T, reg *httpmock.Registry, number int) {
1280 reg.Register(
1281 httpmock.GraphQL(`query IssueByNumber\b`),
1282 httpmock.StringResponse(fmt.Sprintf(`
1283 { "data": { "repository": { "hasIssuesEnabled": true, "issue": {
1284 "id": "%[1]d",
1285 "number": %[1]d,
1286 "url": "https://github.com/OWNER/REPO/issue/%[1]d",
1287 "labels": {
1288 "nodes": [
1289 { "id": "DOCSID", "name": "docs" }
1290 ], "totalCount": 1
1291 },
1292 "projectCards": {
1293 "nodes": [
1294 { "project": { "name": "Roadmap" } }
1295 ], "totalCount": 1
1296 }
1297 } } } }`, number)),
1298 )
1299}
1300
1301func mockIsssueNumberGetWithAssignedActors(_ *testing.T, reg *httpmock.Registry, number int) {
1302 reg.Register(

Callers 2

Test_editRunFunction · 0.85
mockIssueGetFunction · 0.85

Calls 3

GraphQLFunction · 0.92
StringResponseFunction · 0.92
RegisterMethod · 0.45

Tested by

no test coverage detected