From b2887745289d2b2be147b37aa7d75e6d1dbedcdd Mon Sep 17 00:00:00 2001 From: "sylor_huang@126.com" Date: Fri, 18 Sep 2020 11:25:04 +0800 Subject: [PATCH] Change compare --- app/controllers/pull_requests_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/pull_requests_controller.rb b/app/controllers/pull_requests_controller.rb index fa535dc7..fe138fa9 100644 --- a/app/controllers/pull_requests_controller.rb +++ b/app/controllers/pull_requests_controller.rb @@ -161,7 +161,11 @@ class PullRequestsController < ApplicationController 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 + Rails.logger.info("==========git_sourse_commit_id======#{git_sourse_commit_id}") + Rails.logger.info("==========git_target_commit_id======#{git_target_commit_id}") status = (git_sourse_commit_id == git_target_commit_id ? false : true) + Rails.logger.info("==========status======#{status}") + status end # @project_menu_type 为了控制base顶部导航