@(issue: model.Issue, pullreq: model.PullRequest, comments: List[model.IssueComment], collaborators: List[String], milestones: List[(model.Milestone, Int, Int)], dayByDayCommits: Seq[Seq[util.JGitUtil.CommitInfo]], diffs: Seq[util.JGitUtil.DiffInfo], hasWritePermission: Boolean, repository: service.RepositoryService.RepositoryInfo)(implicit context: app.Context) @import context._ @import view.helpers._ @html.main(s"${issue.title} - Pull Request #${issue.issueId} - ${repository.owner}/${repository.name}", Some(repository)){ @html.header("pulls", repository) @defining(dayByDayCommits.flatten){ commits =>
@if(issue.closed) { @comments.find(_.action == "merge").map{ comment => Merged @user(comment.commentedUserName, styleClass="username strong") merged @commits.size @plural(commits.size, "commit") into `@pullreq.requestUserName:@pullreq.requestBranch` from `@pullreq.userName:@pullreq.branch` at @datetime(comment.registeredDate) }.getOrElse { Closed @user(issue.openedUserName, styleClass="username strong") wants to merge @commits.size @plural(commits.size, "commit") into `@pullreq.requestUserName:@pullreq.requestBranch` from `@pullreq.userName:@pullreq.branch` } } else { Open @user(issue.openedUserName, styleClass="username strong") wants to merge @commits.size @plural(commits.size, "commit") into `@pullreq.requestUserName:@pullreq.requestBranch` from `@pullreq.userName:@pullreq.branch` }
@pulls.html.discussion(issue, pullreq, comments, collaborators, milestones, hasWritePermission, repository)
@pulls.html.commits(dayByDayCommits, repository)
@helper.html.diff(diffs, repository, Some(commits.head.id), Some(commits.last.id), true)
} }