diff --git a/src/main/scala/gitbucket/core/controller/PullRequestsController.scala b/src/main/scala/gitbucket/core/controller/PullRequestsController.scala index 99a28ca..3b1377a 100644 --- a/src/main/scala/gitbucket/core/controller/PullRequestsController.scala +++ b/src/main/scala/gitbucket/core/controller/PullRequestsController.scala @@ -169,10 +169,16 @@ val (commits, diffs) = getRequestCompareInfo(owner, name, pullreq.commitIdFrom, owner, name, pullreq.commitIdTo) + val commitsWithStatus = commits.map { day => + day.map { commit => + (commit, getCommitStatusWithSummary(repository.owner, repository.name, commit.id)) + } + } + html.commits( issue, pullreq, - commits, + commitsWithStatus, getPullRequestComments(owner, name, issue.issueId, commits.flatten), diffs.size, isManageable(repository), diff --git a/src/main/twirl/gitbucket/core/pulls/commits.scala.html b/src/main/twirl/gitbucket/core/pulls/commits.scala.html index 600fe99..e00d918 100644 --- a/src/main/twirl/gitbucket/core/pulls/commits.scala.html +++ b/src/main/twirl/gitbucket/core/pulls/commits.scala.html @@ -1,17 +1,17 @@ @(issue: gitbucket.core.model.Issue, pullreq: gitbucket.core.model.PullRequest, - commits: Seq[Seq[gitbucket.core.util.JGitUtil.CommitInfo]], + commits: Seq[Seq[(gitbucket.core.util.JGitUtil.CommitInfo, Option[(gitbucket.core.model.CommitState, List[gitbucket.core.model.CommitStatus])])]], comments: Seq[gitbucket.core.model.Comment], changedFileSize: Int, isManageable: Boolean, repository: gitbucket.core.service.RepositoryService.RepositoryInfo)(implicit context: gitbucket.core.controller.Context) @import gitbucket.core.view.helpers -@gitbucket.core.pulls.html.menu("commits", issue, pullreq, commits.flatten, comments, changedFileSize, isManageable, repository){ +@gitbucket.core.pulls.html.menu("commits", issue, pullreq, commits.flatten.map(_._1), comments, changedFileSize, isManageable, repository){
@helpers.date(day.head.commitTime) | - @day.zipWithIndex.map { case (commit, i) => +@helpers.date(day.head._1.commitTime) | + @day.zipWithIndex.map { case ((commit, status), i) => @if(i != 0){
---|---|
@@ -37,6 +37,9 @@
}
@helpers.user(commit.committerName, commit.committerEmailAddress, "username")
committed @gitbucket.core.helper.html.datetimeago(commit.commitTime)
+ @status.map { case (summary, statuses) =>
+ @gitbucket.core.helper.html.commitstatus(commit.id, summary, statuses)
+ }
|