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

Method Create

pkg/cmd/issue/artifact/client/client_mock.go:152–173  ·  view source on GitHub ↗

Create calls CreateFunc.

(repo ghrepo.Interface, issueNumber int, artifactType string, name string, body string)

Source from the content-addressed store, hash-verified

150
151// Create calls CreateFunc.
152func (mock *ArtifactClientMock) Create(repo ghrepo.Interface, issueNumber int, artifactType string, name string, body string) (*Artifact, error) {
153 if mock.CreateFunc == nil {
154 panic("ArtifactClientMock.CreateFunc: method is nil but ArtifactClient.Create was just called")
155 }
156 callInfo := struct {
157 Repo ghrepo.Interface
158 IssueNumber int
159 ArtifactType string
160 Name string
161 Body string
162 }{
163 Repo: repo,
164 IssueNumber: issueNumber,
165 ArtifactType: artifactType,
166 Name: name,
167 Body: body,
168 }
169 mock.lockCreate.Lock()
170 mock.calls.Create = append(mock.calls.Create, callInfo)
171 mock.lockCreate.Unlock()
172 return mock.CreateFunc(repo, issueNumber, artifactType, name, body)
173}
174
175// CreateCalls gets all the calls that were made to Create.
176// Check the length with:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected