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

Method MarshalJSON

api/queries_issue.go:294–307  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

292}
293
294func (author Author) MarshalJSON() ([]byte, error) {
295 if author.ID == "" {
296 return json.Marshal(map[string]any{
297 "is_bot": true,
298 "login": "app/" + author.Login,
299 })
300 }
301 return json.Marshal(map[string]any{
302 "is_bot": false,
303 "login": author.Login,
304 "id": author.ID,
305 "name": author.Name,
306 })
307}
308
309type CommentAuthor struct {
310 Login string `json:"login"`

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected