MCPcopy Create free account
hub / github.com/gogs/gogs / APIFormat

Method APIFormat

internal/database/comment.go:139–148  ·  view source on GitHub ↗

This method assumes following fields have been assigned with valid values: Required - Poster, Issue

()

Source from the content-addressed store, hash-verified

137// This method assumes following fields have been assigned with valid values:
138// Required - Poster, Issue
139func (c *Comment) APIFormat() *api.Comment {
140 return &api.Comment{
141 ID: c.ID,
142 HTMLURL: c.HTMLURL(),
143 Poster: c.Poster.APIFormat(),
144 Body: c.Content,
145 Created: c.Created,
146 Updated: c.Updated,
147 }
148}
149
150func CommentHashTag(id int64) string {
151 return "issuecomment-" + com.ToStr(id)

Callers 3

CreateIssueCommentFunction · 0.45
UpdateCommentFunction · 0.45
DeleteCommentByIDFunction · 0.45

Calls 1

HTMLURLMethod · 0.95

Tested by

no test coverage detected