From 790d76e90c3e8e16765155c2d65052249080894e Mon Sep 17 00:00:00 2001 From: Keesun Baik Date: Mon, 12 Jan 2015 14:46:17 +0900 Subject: [PATCH] Fixed to check state for only open pull-request * This commit prevents checking merge state for closed or already merged pull-requests. --- app/views/git/create.scala.html | 4 +++- app/views/git/edit.scala.html | 12 ++++++++---- public/javascripts/service/yobi.git.Write.js | 7 +++++-- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/app/views/git/create.scala.html b/app/views/git/create.scala.html index 3e7fe83b6..02fc4d4d6 100644 --- a/app/views/git/create.scala.html +++ b/app/views/git/create.scala.html @@ -82,6 +82,7 @@ +
@Messages("pullRequest.is.merging")
@@ -131,7 +132,8 @@ "fromProject" : $("#fromProjectId"), "toProject" : $("#toProjectId"), "fromBranch" : $("#fromBranch"), - "toBranch" : $("#toBranch") + "toBranch" : $("#toBranch"), + "state" : $("#pullRequestState").data("value") }); // yobi.Mention diff --git a/app/views/git/edit.scala.html b/app/views/git/edit.scala.html index eddb45f76..f92a5ace0 100644 --- a/app/views/git/edit.scala.html +++ b/app/views/git/edit.scala.html @@ -81,9 +81,12 @@ -
- @Messages("pullRequest.is.merging") -
+ + @if(pullRequest.isOpen) { +
+ @Messages("pullRequest.is.merging") +
+ }