Extract createComment (#9125)

* Extract createComment

* fix lint

* fix lint
This commit is contained in:
Lunny Xiao
2019-12-01 10:44:39 +08:00
committed by techknowlogick
parent 7c6f2e27be
commit 2011a5b818
9 changed files with 130 additions and 53 deletions

View File

@ -143,7 +143,7 @@ func createCodeComment(doer *models.User, repo *models.Repository, issue *models
}
patch = gitdiff.CutDiffAroundLine(patchBuf, int64((&models.Comment{Line: line}).UnsignedLine()), line < 0, setting.UI.CodeCommentLines)
}
return models.CreateComment(&models.CreateCommentOptions{
return models.CreateCommentWithNoAction(&models.CreateCommentOptions{
Type: models.CommentTypeCode,
Doer: doer,
Repo: repo,
@ -154,7 +154,6 @@ func createCodeComment(doer *models.User, repo *models.Repository, issue *models
CommitSHA: commitID,
ReviewID: reviewID,
Patch: patch,
NoAction: true,
})
}