(refs #2)Fix requested repository url in the merge guidance.

This commit is contained in:
takezoe
2013-07-15 14:40:50 +09:00
parent 159a5835e0
commit 5ea9150af8
2 changed files with 6 additions and 8 deletions

View File

@@ -46,17 +46,14 @@ trait PullRequestsControllerBase extends ControllerBase {
val issueId = params("id").toInt val issueId = params("id").toInt
getPullRequest(owner, name, issueId) map { case(issue, pullreq) => getPullRequest(owner, name, issueId) map { case(issue, pullreq) =>
println(pullreq.mergeStartId)
println(pullreq.mergeEndId)
pulls.html.pullreq( pulls.html.pullreq(
issue, pullreq, issue, pullreq,
getComments(owner, name, issueId.toInt), getComments(owner, name, issueId.toInt),
(getCollaborators(owner, name) :+ owner).sorted, (getCollaborators(owner, name) :+ owner).sorted,
getMilestones(owner, name), getMilestones(owner, name),
hasWritePermission(owner, name, context.loginAccount), hasWritePermission(owner, name, context.loginAccount),
repository) repository,
s"${baseUrl}${context.path}/git/${pullreq.requestUserName}/${pullreq.requestRepositoryName}.git")
} getOrElse NotFound } getOrElse NotFound
}) })

View File

@@ -4,7 +4,8 @@
collaborators: List[String], collaborators: List[String],
milestones: List[model.Milestone], milestones: List[model.Milestone],
hasWritePermission: Boolean, hasWritePermission: Boolean,
repository: service.RepositoryService.RepositoryInfo)(implicit context: app.Context) repository: service.RepositoryService.RepositoryInfo,
requestRepositoryUrl: String)(implicit context: app.Context)
@import context._ @import context._
@import view.helpers._ @import view.helpers._
@html.main("%s - Issue #%d - %s/%s".format(issue.title, issue.issueId, repository.owner, repository.name)){ @html.main("%s - Issue #%d - %s/%s".format(issue.title, issue.issueId, repository.owner, repository.name)){
@@ -120,7 +121,7 @@
</p> </p>
<div class="input-prepend"> <div class="input-prepend">
<span class="add-on">HTTP</span> <span class="add-on">HTTP</span>
<input type="text" value="https://github.com/takezoen/test.git" id="repository-url" readonly> <input type="text" value="@requestRepositoryUrl" id="repository-url" readonly>
</div> </div>
<p> <p>
<strong>Step 1:</strong> Check out a new branch to test the changes — run this from your project directory <strong>Step 1:</strong> Check out a new branch to test the changes — run this from your project directory
@@ -129,7 +130,7 @@
<p> <p>
<strong>Step 2:</strong> Bring in @{pullreq.requestUserName}'s changes and test <strong>Step 2:</strong> Bring in @{pullreq.requestUserName}'s changes and test
</p> </p>
<pre>git pull https://github.com/@{pullreq.requestUserName}/@{repository.name}.git @{pullreq.requestBranch}</pre> <pre>git pull @{requestRepositoryUrl} @{pullreq.requestBranch}</pre>
<p> <p>
<strong>Step 3:</strong> Merge the changes and update the server <strong>Step 3:</strong> Merge the changes and update the server
</p> </p>