forked from Gitlink/forgeplus
FIX create remote pr bug
This commit is contained in:
parent
5d61321c55
commit
3786953bd6
|
@ -68,8 +68,8 @@ class PullRequestsController < ApplicationController
|
|||
}
|
||||
local_requests = PullRequest.new(@local_params.merge(pr_params))
|
||||
if local_requests.save
|
||||
@requests_params.merge!(head: "#{params[:merge_user_login]}:#{params[:head]}") if local_requests.is_original && params[:merge_user_login]
|
||||
gitea_request = Gitea::PullRequest::CreateService.new(@project.owner.try(:gitea_token), @project.owner, @repository.try(:identifier), @requests_params).call
|
||||
remote_pr_params = @local_params.merge(head: "#{params[:merge_user_login]}:#{params[:head]}").compact if local_requests.is_original && params[:merge_user_login]
|
||||
gitea_request = Gitea::PullRequest::CreateService.call(current_user.try(:gitea_token), @project.owner, @repository.try(:identifier), remote_pr_params.except(:milestone))
|
||||
if gitea_request && local_requests.update_attributes(gpid: gitea_request["number"])
|
||||
if params[:issue_tag_ids].present?
|
||||
params[:issue_tag_ids].each do |tag|
|
||||
|
|
Loading…
Reference in New Issue