@ -49,7 +49,7 @@ class RepositoriesController < ApplicationController
helper :project_score
#@root_path = RepositoriesHelper::ROOT_PATH
$g=Gitlab.client
require 'net/ssh'
# require 'net/ssh'
rescue_from Redmine::Scm::Adapters::CommandFailed, :with => :show_error_command_failed
def new
@ -65,7 +65,7 @@ module RepositoriesHelper
# 获取diff内容行号
def diff_line_num content
content.scan(/@@ -(\d+),\d+ \+\d+,\d+ @@/).first.join("").to_i
content.scan(/@@ -(\d+),\d+ \+\d+,\d+ @@/).first.nil? ? "" : content.scan(/@@ -(\d+),\d+ \+\d+,\d+ @@/).first.join("").to_i
end
# 处理内容