MCPcopy
hub / github.com/cli/cli / StubRepoInfoResponse

Method StubRepoInfoResponse

pkg/httpmock/legacy.go:9–23  ·  view source on GitHub ↗

TODO: clean up methods in this file when there are no more callers

(owner, repo, branch string)

Source from the content-addressed store, hash-verified

7// TODO: clean up methods in this file when there are no more callers
8
9func (r *Registry) StubRepoInfoResponse(owner, repo, branch string) {
10 r.Register(
11 GraphQL(`query RepositoryInfo\b`),
12 StringResponse(fmt.Sprintf(`
13 { "data": { "repository": {
14 "id": "REPOID",
15 "name": "%s",
16 "owner": {"login": "%s"},
17 "description": "",
18 "defaultBranchRef": {"name": "%s"},
19 "hasIssuesEnabled": true,
20 "viewerPermission": "WRITE"
21 } } }
22 `, repo, owner, branch)))
23}
24
25func (r *Registry) StubIssueRepoInfoResponse(owner, repo string) {
26 r.Register(

Callers 8

Test_runBrowseFunction · 0.95
Test_RepoView_WebFunction · 0.95
Test_viewRun_jsonFunction · 0.95
Test_createRunFunction · 0.95
Test_createRun_GHESFunction · 0.95
TestRemoteGuessingFunction · 0.95

Calls 3

RegisterMethod · 0.95
GraphQLFunction · 0.85
StringResponseFunction · 0.85

Tested by 8

Test_runBrowseFunction · 0.76
Test_RepoView_WebFunction · 0.76
Test_viewRun_jsonFunction · 0.76
Test_createRunFunction · 0.76
Test_createRun_GHESFunction · 0.76
TestRemoteGuessingFunction · 0.76