CreateComment creates comment of issue or commit.
(opts *CreateCommentOptions)
| 318 | |
| 319 | // CreateComment creates comment of issue or commit. |
| 320 | func CreateComment(opts *CreateCommentOptions) (comment *Comment, err error) { |
| 321 | sess := x.NewSession() |
| 322 | defer sess.Close() |
| 323 | if err = sess.Begin(); err != nil { |
| 324 | return nil, err |
| 325 | } |
| 326 | |
| 327 | comment, err = createComment(sess, opts) |
| 328 | if err != nil { |
| 329 | return nil, err |
| 330 | } |
| 331 | |
| 332 | return comment, sess.Commit() |
| 333 | } |
| 334 | |
| 335 | // CreateIssueComment creates a plain issue comment. |
| 336 | func CreateIssueComment(doer *User, repo *Repository, issue *Issue, content string, attachments []string) (*Comment, error) { |
no test coverage detected