mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
FIX code review and conflict
This commit is contained in:
@@ -20,7 +20,7 @@ module ControllerRescueHandler
|
||||
end
|
||||
# rescue_from ActionView::MissingTemplate, with: :object_not_found
|
||||
# rescue_from ActiveRecord::RecordNotFound, with: :object_not_found
|
||||
rescue_from Educoder::TipException, with: :tip_show
|
||||
rescue_from Gitlink::TipException, with: :tip_show
|
||||
rescue_from ::ActionView::MissingTemplate, with: :missing_template
|
||||
rescue_from ActiveRecord::RecordNotFound, with: :object_not_found
|
||||
rescue_from ActionController::ParameterMissing, with: :render_parameter_missing
|
||||
|
||||
@@ -36,10 +36,10 @@ module GitCommon
|
||||
begin
|
||||
@commits = GitService.commits(repo_path: @repo_path)
|
||||
logger.info("git first commit is #{@commits.try(:first)}")
|
||||
raise Educoder::TipException.new("请先创建版本库") if @commits.nil?
|
||||
raise Gitlink::TipException.new("请先创建版本库") if @commits.nil?
|
||||
rescue Exception => e
|
||||
uid_logger_error(e.message)
|
||||
raise Educoder::TipException.new("提交记录异常")
|
||||
raise Gitlink::TipException.new("提交记录异常")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ module GitHelper
|
||||
|
||||
rescue Exception => e
|
||||
Rails.logger.error(e.message)
|
||||
raise Educoder::TipException.new("文档内容获取异常")
|
||||
raise Gitlink::TipException.new("文档内容获取异常")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -64,7 +64,7 @@ module GitHelper
|
||||
|
||||
# 版本库Fork功能
|
||||
def project_fork(container, original_rep_path, username)
|
||||
raise Educoder::TipException.new("fork源路径为空,fork失败!") if original_rep_path.blank?
|
||||
raise Gitlink::TipException.new("fork源路径为空,fork失败!") if original_rep_path.blank?
|
||||
# 将要生成的仓库名字
|
||||
new_repo_name = "#{username.try(:strip)}/#{container.try(:identifier)}#{ Time.now.strftime("%Y%m%d%H%M%S")}"
|
||||
# uid_logger("start fork container: repo_name is #{new_repo_name}")
|
||||
|
||||
Reference in New Issue
Block a user