Browse Source

Change

tags/v1.0.0
sylor_huang@126.com 5 years ago
parent
commit
5aff092a35
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      app/controllers/pull_requests_controller.rb

+ 5
- 1
app/controllers/pull_requests_controller.rb View File

@@ -70,7 +70,11 @@ class PullRequestsController < ApplicationController
if local_requests.save
remote_pr_params = @local_params
remote_pr_params = remote_pr_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 @project.forked_from_project_id.present?
gitea_request = Gitea::PullRequest::CreateService.call(current_user.try(:gitea_token), @project.fork_project.owner, @repository.try(:identifier), remote_pr_params.except(:milestone))
else
gitea_request = Gitea::PullRequest::CreateService.call(current_user.try(:gitea_token), @project.owner, @repository.try(:identifier), remote_pr_params.except(:milestone))
end
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…
Cancel
Save