MCPcopy Create free account
hub / github.com/bytebase/bytebase / GetIssueComment

Method GetIssueComment

backend/store/issue_comment.go:41–53  ·  view source on GitHub ↗
(ctx context.Context, find *FindIssueCommentMessage)

Source from the content-addressed store, hash-verified

39}
40
41func (s *Store) GetIssueComment(ctx context.Context, find *FindIssueCommentMessage) (*IssueCommentMessage, error) {
42 list, err := s.ListIssueComment(ctx, find)
43 if err != nil {
44 return nil, err
45 }
46 if len(list) == 0 {
47 return nil, nil
48 }
49 if len(list) > 1 {
50 return nil, errors.Errorf("found %d issue comment, expected 1", len(list))
51 }
52 return list[0], nil
53}
54
55func (s *Store) ListIssueComment(ctx context.Context, find *FindIssueCommentMessage) ([]*IssueCommentMessage, error) {
56 q := qb.Q().Space(`

Callers 1

UpdateIssueCommentMethod · 0.45

Calls 2

ListIssueCommentMethod · 0.95
ErrorfMethod · 0.80

Tested by

no test coverage detected