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

Method AddComment

pkg/cmd/discussion/client/client_mock.go:252–271  ·  view source on GitHub ↗

AddComment calls AddCommentFunc.

(repo ghrepo.Interface, discussionID string, body string, replyToID string)

Source from the content-addressed store, hash-verified

250
251// AddComment calls AddCommentFunc.
252func (mock *DiscussionClientMock) AddComment(repo ghrepo.Interface, discussionID string, body string, replyToID string) (*DiscussionComment, error) {
253 if mock.AddCommentFunc == nil {
254 panic("DiscussionClientMock.AddCommentFunc: method is nil but DiscussionClient.AddComment was just called")
255 }
256 callInfo := struct {
257 Repo ghrepo.Interface
258 DiscussionID string
259 Body string
260 ReplyToID string
261 }{
262 Repo: repo,
263 DiscussionID: discussionID,
264 Body: body,
265 ReplyToID: replyToID,
266 }
267 mock.lockAddComment.Lock()
268 mock.calls.AddComment = append(mock.calls.AddComment, callInfo)
269 mock.lockAddComment.Unlock()
270 return mock.AddCommentFunc(repo, discussionID, body, replyToID)
271}
272
273// AddCommentCalls gets all the calls that were made to AddComment.
274// Check the length with:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected