add debug

This commit is contained in:
Nigel 2019-09-04 10:41:47 +08:00
parent f7aa2afec8
commit 1a413cb415
2 changed files with 3 additions and 2 deletions

View File

@ -144,12 +144,12 @@ module Mobile
# add by qiubing
commit_diff = g.commit_diff(project.gpid, sha)
Rails.logger.info("qiubingqiubing")
# Rails.logger.info("qiubingqiubing")
(0...commit_diff.length).each do |i|
tempDiff = commit_diff[i]
tempDiffArry = tempDiff.diff.split("\n")
(2...tempDiffArry.length).each do |j|
Rails.logger.info tempDiffArry[j]
# Rails.logger.info tempDiffArry[j]
if tempDiffArry[j][0] == "+" or tempDiffArry[j][0] == "-"
modificationLines += 1
end

View File

@ -273,6 +273,7 @@ class PullRequestsController < ApplicationController
# @param [Integer] id The ID of a merge request.
# @return [Gitlab::ObjectifiedHash]
def accept_pull_request
Rails.logger.info("qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqiiiiiiiiiiiiiiiiiiiii")
begin
@status = @g.accept_merge_rquest(@project.gpid, params[:id], User.current.gid)
user = User.find_by_login(@status.author.try(:username))