@(issue: gitbucket.core.model.Issue, pullreq: gitbucket.core.model.PullRequest, comments: List[gitbucket.core.model.Comment], issueLabels: List[gitbucket.core.model.Label], collaborators: List[String], milestones: List[(gitbucket.core.model.Milestone, Int, Int)], labels: List[gitbucket.core.model.Label], hasWritePermission: Boolean, repository: gitbucket.core.service.RepositoryService.RepositoryInfo)(implicit context: gitbucket.core.controller.Context) @import context._ @import gitbucket.core.view.helpers._ @import gitbucket.core.model._
@issues.html.commentlist(Some(issue), comments, hasWritePermission, repository, Some(pullreq))
@defining(comments.flatMap { case comment: gitbucket.core.model.IssueComment => Some(comment) case other => None }.exists(_.action == "merge")){ merged => @if(!issue.closed){ } @if(hasWritePermission && issue.closed && pullreq.userName == pullreq.requestUserName && merged && pullreq.repositoryName == pullreq.requestRepositoryName && repository.branchList.contains(pullreq.requestBranch)){
Delete branch
Pull request successfully merged and closed
You're all set-the @pullreq.requestBranch branch can be safely deleted.
} @issues.html.commentform(issue, !merged, hasWritePermission, repository) }
@issues.html.issueinfo(Some(issue), comments, issueLabels, collaborators, milestones, labels, hasWritePermission, repository)