Preview for listing comments

Signed-off-by: Jonas Franz <info@jonasfranz.software>
This commit is contained in:
Jonas Franz
2018-05-11 10:59:20 +02:00
parent 17af2d17be
commit 75b7d9b86a
5 changed files with 168 additions and 0 deletions

View File

@@ -471,6 +471,13 @@ func ViewPullFiles(ctx *context.Context) {
ctx.Data["RawPath"] = setting.AppSubURL + "/" + path.Join(headTarget, "raw", "commit", endCommitID)
ctx.Data["RequireHighlightJS"] = true
pathToLineToComment, err := models.FetchCodeComments(issue, ctx.User)
if err != nil {
ctx.ServerError("FetchCodeComments", err)
return
}
ctx.Data["CodeComments"] = pathToLineToComment
ctx.HTML(200, tplPullFiles)
}