From 789563740e8b2a3c7594b18a90e8536f81a6f707 Mon Sep 17 00:00:00 2001 From: "sylor_huang@126.com" Date: Fri, 18 Sep 2020 11:20:31 +0800 Subject: [PATCH] change --- app/controllers/pull_requests_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/pull_requests_controller.rb b/app/controllers/pull_requests_controller.rb index c77c9837..fa535dc7 100644 --- a/app/controllers/pull_requests_controller.rb +++ b/app/controllers/pull_requests_controller.rb @@ -155,11 +155,11 @@ class PullRequestsController < ApplicationController user_name_target = forked_source_project.owner.try(:login) git_target_tree = '--git-dir=/home/git/repositories/' + user_name_target + '/' + identifier + '.git' - git_sourse_commit_id = @g.commis(@project.gpid, :ref => source_branch).first.try(:id) - git_target_commit_id = @g.commis(forked_source_project.gpid, :ref => target_branch).first.try(:id) + git_sourse_commit_id = @g.commits(@project.gpid, :ref_name => source_branch).first.try(:id) + git_target_commit_id = @g.commits(forked_source_project.gpid, :ref_name => target_branch).first.try(:id) else - git_sourse_commit_id = @g.commis(@project.gpid, :ref => source_branch).first.try(:id) - git_target_commit_id = @g.commis(@project.gpid, :ref => target_branch).first.try(:id) + git_sourse_commit_id = @g.commits(@project.gpid, :ref_name => source_branch).first.try(:id) + git_target_commit_id = @g.commits(@project.gpid, :ref_name => target_branch).first.try(:id) end status = (git_sourse_commit_id == git_target_commit_id ? false : true) end