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

Function registerWorktreeDevelopHTTPStubs

pkg/cmd/issue/develop/develop_test.go:988–1005  ·  view source on GitHub ↗
(reg *httpmock.Registry, _ *testing.T)

Source from the content-addressed store, hash-verified

986}
987
988func registerWorktreeDevelopHTTPStubs(reg *httpmock.Registry, _ *testing.T) {
989 reg.Register(
990 httpmock.GraphQL(`query LinkedBranchFeature\b`),
991 httpmock.StringResponse(`{"data":{"LinkedBranch":{"fields":[{"name":"id"},{"name":"ref"}]}}}`),
992 )
993 reg.Register(
994 httpmock.GraphQL(`query IssueByNumber\b`),
995 httpmock.StringResponse(`{"data":{"repository":{"hasIssuesEnabled":true,"issue":{"id":"SOMEID","number":123,"title":"my issue"}}}}`),
996 )
997 reg.Register(
998 httpmock.GraphQL(`query FindRepoBranchID\b`),
999 httpmock.StringResponse(`{"data":{"repository":{"id":"REPOID","defaultBranchRef":{"target":{"oid":"DEFAULTOID"}},"ref":{"target":{"oid":""}}}}}`),
1000 )
1001 reg.Register(
1002 httpmock.GraphQL(`mutation CreateLinkedBranch\b`),
1003 httpmock.StringResponse(`{"data":{"createLinkedBranch":{"linkedBranch":{"id":"2","ref":{"name":"my-branch"}}}}}`),
1004 )
1005}

Callers

nothing calls this directly

Calls 3

GraphQLFunction · 0.92
StringResponseFunction · 0.92
RegisterMethod · 0.45

Tested by

no test coverage detected