mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
FIX 修复版本库在线创建文件时,commiter信息错误的bug
This commit is contained in:
@@ -66,6 +66,8 @@ class RepositoriesController < ApplicationController
|
||||
end
|
||||
|
||||
def create_file
|
||||
content_params = content_params.merge(committer: {email: current_user.mail, name: current_user.login})
|
||||
|
||||
interactor = Gitea::CreateFileInteractor.call(current_user.gitea_token, @project.owner.login, content_params)
|
||||
if interactor.success?
|
||||
@file = interactor.result
|
||||
|
||||
@@ -57,6 +57,7 @@ module Gitea
|
||||
file_params = file_params.merge(new_branch: @params[:new_branch]) unless @params[:new_branch].blank?
|
||||
file_params = file_params.merge(content: Base64.encode64(@params[:content]))
|
||||
file_params = file_params.merge(message: @params[:message]) unless @params[:message].blank?
|
||||
file_params = file_params.merge(committer: @params[:committer])
|
||||
file_params
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user