dev_static
daiao 5 years ago
parent 04d4603c23
commit 51b59cb16b

@ -45,6 +45,11 @@ module GitHelper
content: content, author_name: username, author_email: mail)
end
# 添加目录
def add_git_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)
end
# 版本库Fork功能
def project_fork(container, original_rep_path, username)
raise Educoder::TipException.new("fork源路径为空,fork失败!") if original_rep_path.blank?

@ -897,7 +897,11 @@ class ShixunsController < ApplicationController
render_ok
end
# 上传目录
def upload_git_folder
author_name = current_user.real_name
author_email = current_user.git_mail
add_git_folder(@path, author_name, author_email, "upload folder by browser")
render_ok
end

Loading…
Cancel
Save