pull request创建的一些改进

This commit is contained in:
huang 2016-11-30 09:52:59 +08:00
parent 1299be5384
commit 934b219454
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ class PullRequestsController < ApplicationController
if compare_pull_request(source_branch, target_project_id, target_branch)
# 如果传送了目标项目ID即向fork源项目发送请求
# if params[:forked_project_id] && params[:source_project] == "forked_project_name"
if !params[:target_project_id].blank?
if !params[:target_project_id].blank? && params[:target_project_id].to_i != @project.id
target_project_id = params[:forked_project_id].to_i
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)
@fork_project_name = Project.find(params[:target_project_id]).try(:name)