From b62ac02c155af4bc24320c25e1378a7165db940d Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 5 Aug 2016 14:19:09 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E8=BA=AB=E5=88=86=E6=94=AF=E5=88=9B?= =?UTF-8?q?=E5=BB=BAPR=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/pull_requests_controller.rb | 2 +- app/views/pull_requests/_form.html.erb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/pull_requests_controller.rb b/app/controllers/pull_requests_controller.rb index 2a88e4dcb..7f1797f73 100644 --- a/app/controllers/pull_requests_controller.rb +++ b/app/controllers/pull_requests_controller.rb @@ -60,7 +60,7 @@ class PullRequestsController < ApplicationController target_branch = params[:target_branch] begin # 如果传送了目标项目ID,则PR请求发至目标项目 - if params[:forked_project_id] + if params[:forked_project_id] && params[:source_project] == "forked_project_name" target_project_id = params[:target_project_id] request = @g.create_merge_request(@project.gpid, title, User.current.gid, :description => description, :source_branch => source_branch, :target_branch => target_branch, :target_project_id => target_project_id) else diff --git a/app/views/pull_requests/_form.html.erb b/app/views/pull_requests/_form.html.erb index eaf73b137..52e3ed20a 100644 --- a/app/views/pull_requests/_form.html.erb +++ b/app/views/pull_requests/_form.html.erb @@ -15,13 +15,13 @@ <% if @forked_project.nil? %> <%= select_tag :branch, options_for_select(@source_rev), :name => "target_branch", :value => "target_branch",:class => "ml30 fontGrey3 fb fl", :style => "padding:5px 0 5px 5px;", :id => "targetBranch" %> <% else %> - - <% @source_rev.each do |rev| %> - + <% end %> <% end %>