diff options
author | zeripath <art27@cantab.net> | 2020-03-30 19:52:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-30 21:52:45 +0300 |
commit | bf847b9397b0365a81d1a2ca5386a6c4280d9e94 (patch) | |
tree | a902635a79aeb9442381d9d9741095b15a9e8721 /routers/repo | |
parent | 972b3bf3b0b772dd919333375356ae56e469ebea (diff) | |
download | gitea-bf847b9397b0365a81d1a2ca5386a6c4280d9e94.tar.gz gitea-bf847b9397b0365a81d1a2ca5386a6c4280d9e94.zip |
Upgrade golangci-lint to 1.24.0 (#10894)
* upgrade golangci-lint to 1.24.0 to allow go 1.14 compatibility
* fix golangci-lint errors
* make make golangci-lint work when out of go-path
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'routers/repo')
-rw-r--r-- | routers/repo/compare.go | 1 | ||||
-rw-r--r-- | routers/repo/pull_review.go | 11 |
2 files changed, 6 insertions, 6 deletions
diff --git a/routers/repo/compare.go b/routers/repo/compare.go index 4769a4da1a..815ec35650 100644 --- a/routers/repo/compare.go +++ b/routers/repo/compare.go @@ -422,7 +422,6 @@ func CompareDiff(ctx *context.Context) { beforeCommitID := ctx.Data["BeforeCommitID"].(string) afterCommitID := ctx.Data["AfterCommitID"].(string) - ctx.Data["Title"] = "Comparing " + base.ShortSha(beforeCommitID) + "..." + base.ShortSha(afterCommitID) ctx.Data["IsRepoToolbarCommits"] = true diff --git a/routers/repo/pull_review.go b/routers/repo/pull_review.go index 9fcb02cd4a..0f5375dc16 100644 --- a/routers/repo/pull_review.go +++ b/routers/repo/pull_review.go @@ -51,13 +51,14 @@ func CreateCodeComment(ctx *context.Context, form auth.CodeCommentForm) { return } - log.Trace("Comment created: %d/%d/%d", ctx.Repo.Repository.ID, issue.ID, comment.ID) - - if comment != nil { - ctx.Redirect(comment.HTMLURL()) - } else { + if comment == nil { + log.Trace("Comment not created: %-v #%d[%d]", ctx.Repo.Repository, issue.Index, issue.ID) ctx.Redirect(fmt.Sprintf("%s/pulls/%d/files", ctx.Repo.RepoLink, issue.Index)) + return } + + log.Trace("Comment created: %-v #%d[%d] Comment[%d]", ctx.Repo.Repository, issue.Index, issue.ID, comment.ID) + ctx.Redirect(comment.HTMLURL()) } // SubmitReview creates a review out of the existing pending review or creates a new one if no pending review exist |