|
|
@ -46,10 +46,15 @@ module GitHelper
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
# 添加目录
|
|
|
|
# 添加目录
|
|
|
|
def add_git_folder(folder_path, author_name, author_email, message)
|
|
|
|
def git_add_folder(folder_path, author_name, author_email, message)
|
|
|
|
GitService.add_tree(file_path: folder_path, message: message, author_name: author_name, author_email: author_email)
|
|
|
|
GitService.add_tree(file_path: folder_path, message: message, author_name: author_name, author_email: author_email)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 删除文件
|
|
|
|
|
|
|
|
def git_delete_file(file_path, author_name, author_email, message)
|
|
|
|
|
|
|
|
GitService.delete_file(file_path: file_path, message: message, author_name: author_name, author_email: author_email)
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
# 版本库Fork功能
|
|
|
|
# 版本库Fork功能
|
|
|
|
def project_fork(container, original_rep_path, username)
|
|
|
|
def project_fork(container, original_rep_path, username)
|
|
|
|
raise Educoder::TipException.new("fork源路径为空,fork失败!") if original_rep_path.blank?
|
|
|
|
raise Educoder::TipException.new("fork源路径为空,fork失败!") if original_rep_path.blank?
|
|
|
|