aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-04-22 00:36:37 +0800
committerGitHub <noreply@github.com>2023-04-21 12:36:37 -0400
commit13d1d2764cc1f813f7fc991ba988c1e700fd0f44 (patch)
tree1cbf17c5013f8f075516ed129ad5380def31e676 /routers
parentcb19772d6a2a86d556f350d42758a9d64db1b402 (diff)
downloadgitea-13d1d2764cc1f813f7fc991ba988c1e700fd0f44.tar.gz
gitea-13d1d2764cc1f813f7fc991ba988c1e700fd0f44.zip
Show commit history for closed/merged PRs (#24238)
Close #24237 Before: <details> ![image](https://user-images.githubusercontent.com/2114189/233424875-a69c6dad-df4a-483e-b796-36c6459af2d6.png) </details> After: ![image](https://user-images.githubusercontent.com/2114189/233424712-60a296de-017b-49a8-89b2-5925ff452646.png) Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'routers')
-rw-r--r--routers/web/repo/issue.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go
index a9c67a9e34..bea35785bb 100644
--- a/routers/web/repo/issue.go
+++ b/routers/web/repo/issue.go
@@ -1621,8 +1621,10 @@ func ViewIssue(ctx *context.Context) {
comment.Type == issues_model.CommentTypeStopTracking {
// drop error since times could be pruned from DB..
_ = comment.LoadTime()
- } else if comment.Type == issues_model.CommentTypeClose {
- // record ID of latest closed comment.
+ }
+
+ if comment.Type == issues_model.CommentTypeClose || comment.Type == issues_model.CommentTypeMergePull {
+ // record ID of the latest closed/merged comment.
// if PR is closed, the comments whose type is CommentTypePullRequestPush(29) after latestCloseCommentID won't be rendered.
latestCloseCommentID = comment.ID
}