修改branch

This commit is contained in:
sylor_huang@126.com
2020-06-05 10:01:04 +08:00
parent 6b44b28c60
commit d17d3dd84c
4 changed files with 20 additions and 1 deletions

View File

@@ -92,6 +92,24 @@ class RepositoriesController < ApplicationController
end
end
def upload_file
file_ids = params[:attachment_ids]
if file_ids.present?
file_ids.each do |id|
attachment = Attachment.select(:id, :filename, :disk_directory, :disk_filename).find_by(id)
file_path = attachemnt&.diskfile.to_s
unless File.exists?(file_path)
file_content = File.open(file_path)
end
end
else
render_error("请上传文件")
end
files.each do
end
def repo_hook
hook_type = request.headers["X-Gitea-Event"].to_s # 获取推送的方式
ownername = @project.owner.try(:login)