MCPcopy Index your code
hub / github.com/git-bug/git-bug / parseMessage

Method parseMessage

commands/bug/bug_comment_test.go:100–114  ·  view source on GitHub ↗
(comment *parsedComment, line string)

Source from the content-addressed store, hash-verified

98}
99
100func (p *commentParser) parseMessage(comment *parsedComment, line string) {
101 p.t.Helper()
102
103 if strings.HasPrefix(line, "Author: ") {
104 p.comments = append(p.comments, *comment)
105 comment = &parsedComment{}
106 p.parseAuthor(comment, line)
107
108 return
109 }
110
111 require.True(p.t, line == "" || strings.HasPrefix(line, " "))
112
113 comment.message = strings.Join([]string{comment.message, line}, "\n")
114}
115
116func normalizeParsedComments(t *testing.T, comments []parsedComment) []parsedComment {
117 t.Helper()

Callers

nothing calls this directly

Calls 3

parseAuthorMethod · 0.95
HelperMethod · 0.80
HasPrefixMethod · 0.45

Tested by

no test coverage detected