add logs to debug

This commit is contained in:
Nigel 2019-09-03 08:50:49 +08:00
parent a56e888ef5
commit 00828ea222
1 changed files with 12 additions and 12 deletions

View File

@ -143,20 +143,20 @@ module Mobile
end
# add by qiubing
# commit_diff = g.commit_diff(project.gpid, sha)
# (0...commit_diff.length).each do |i|
# tempDiff = commit_diff[i]
# tempDiffArry = tempDiff.diff.split("\n")
# (2...tempDiffArry.length).each do |j|
# if tempDiffArry[j][0] == "+" or tempDiffArry[j][0] == "-"
# modificationLines += 1
# end
# end
# end
commit_diff = g.commit_diff(project.gpid, sha)
(0...commit_diff.length).each do |i|
tempDiff = commit_diff[i]
tempDiffArry = tempDiff.diff.split("\n")
(2...tempDiffArry.length).each do |j|
if tempDiffArry[j][0] == "+" or tempDiffArry[j][0] == "-"
modificationLines += 1
end
end
end
# end by qiubing
end
{status:0, result:result}
# {status:0, result:result, modificationLines:modificationLines}
# {status:0, result:result}
{status:0, result:result, modificationLines:modificationLines}
else
{status:1, message: '该项目不存在或已被删除' }
end