@(status: gitbucket.core.service.PullRequestService.MergeStatus, issue: gitbucket.core.model.Issue, pullreq: gitbucket.core.model.PullRequest, originRepository: gitbucket.core.service.RepositoryService.RepositoryInfo, forkedRepository: gitbucket.core.service.RepositoryService.RepositoryInfo)(implicit context: gitbucket.core.controller.Context) @import gitbucket.core.service.SystemSettingsService @import context._ @import gitbucket.core.view.helpers._ @import model.CommitState
@if(!status.statuses.isEmpty){
@defining(status.commitStateSummary){ case (summaryState, summary) =>
@commitStateIcon(summaryState) @commitStateText(summaryState, pullreq.commitIdTo) — @summary checks
}
@status.statusesAndRequired.map{ case (status, required) =>
@if(required){ Required } @status.targetUrl.map{ url => Details }
@commitStateIcon(status.state) @status.context @status.description.map{ desc => — @desc }
}
}
@if(status.hasConflict){
This branch has conflicts that must be resolved
@if(status.hasMergePermission){ Use the command line to resolve conflicts before continuing. } else { Only those with write access to this repository can merge pull requests. }
} else { @if(status.branchIsOutOfDate){ @if(status.hasUpdatePermission){
}
This branch is out-of-date with the base branch
Merge the latest changes from `@pullreq.branch` into this branch.
} else { @if(status.hasRequiredStatusProblem) {
Required statuses must pass before merging.
All required status checks on this pull request must run successfully to enable automatic merging.
} else {
@if(status.hasMergePermission){ Merging can be performed automatically.
Merging can be performed automatically.
} else { This branch has no conflicts with the base branch.
Only those with write access to this repository can merge pull requests.
} } } }
@if(status.hasMergePermission){
You can also merge branches on the command line.

@if(status.hasConflict){ Checkout via command line

If you cannot merge a pull request automatically here, you have the option of checking it out via command line to resolve conflicts and perform a manual merge.

} else { Merging via command line

If you do not want to use the merge button or an automatic merge cannot be performed, you can perform a manual merge on the command line.

} @helper.html.copy("repository-url-copy", forkedRepository.httpUrl){
HTTP @if(settings.ssh && loginAccount.isDefined){ SSH }
}

Step 1: From your project repository, check out a new branch and test the changes.

@defining(s"git checkout -b ${pullreq.requestUserName}-${pullreq.requestBranch} ${pullreq.branch}\n" + s"git pull ${forkedRepository.httpUrl} ${pullreq.requestBranch}"){ command => @helper.html.copy("merge-command-copy-1", command, "position: absolute; right: 31px;")()

    @Html(command)

}

Step 2: Merge the changes and update on the server.

@defining(s"git checkout ${pullreq.branch}\ngit merge --no-ff ${pullreq.requestUserName}-${pullreq.requestBranch}\n" + s"git push origin ${pullreq.branch}"){ command => @helper.html.copy("merge-command-copy-2", command, "position: absolute; right: 31px;")()

    @command

}
}
Merge pull request #@issue.issueId from @{pullreq.requestUserName}/@{pullreq.requestBranch}
@issue.title