Merge pull request '修改pull接口 新增merge_project_identifier参数接收' (#86) from KingChan/forgeplus:chenjing into standalone_develop

This commit is contained in:
KingChan 2023-07-14 10:54:26 +08:00
commit b838921f74
1 changed files with 1 additions and 1 deletions

View File

@ -180,7 +180,7 @@ class PullRequests::CreateService < ApplicationService
end
def compare_head_base!
head = pull_request.is_original && @params[:merge_user_login] ? "#{@params[:merge_user_login]}/#{@project.identifier}:#{@params[:head]}" : @params[:head]
head = pull_request.is_original && @params[:merge_user_login] ? "#{@params[:merge_user_login]}/#{@params[:merge_project_identifier]}:#{@params[:head]}" : @params[:head]
compare_result = Gitea::Repository::Commits::CompareService.call(@owner.login, @project.identifier, Addressable::URI.escape(@params[:base]), Addressable::URI.escape(head), @current_user.gitea_token)
raise '分支内容相同,无需创建合并请求' if compare_result["Commits"].blank? && compare_result["Diff"].blank?
end