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

Method CreateJob

pkg/cmd/agent-task/capi/client_mock.go:154–177  ·  view source on GitHub ↗

CreateJob calls CreateJobFunc.

(ctx context.Context, owner string, repo string, problemStatement string, baseBranch string, customAgent string)

Source from the content-addressed store, hash-verified

152
153// CreateJob calls CreateJobFunc.
154func (mock *CapiClientMock) CreateJob(ctx context.Context, owner string, repo string, problemStatement string, baseBranch string, customAgent string) (*Job, error) {
155 if mock.CreateJobFunc == nil {
156 panic("CapiClientMock.CreateJobFunc: method is nil but CapiClient.CreateJob was just called")
157 }
158 callInfo := struct {
159 Ctx context.Context
160 Owner string
161 Repo string
162 ProblemStatement string
163 BaseBranch string
164 CustomAgent string
165 }{
166 Ctx: ctx,
167 Owner: owner,
168 Repo: repo,
169 ProblemStatement: problemStatement,
170 BaseBranch: baseBranch,
171 CustomAgent: customAgent,
172 }
173 mock.lockCreateJob.Lock()
174 mock.calls.CreateJob = append(mock.calls.CreateJob, callInfo)
175 mock.lockCreateJob.Unlock()
176 return mock.CreateJobFunc(ctx, owner, repo, problemStatement, baseBranch, customAgent)
177}
178
179// CreateJobCalls gets all the calls that were made to CreateJob.
180// Check the length with:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected