From 2a0ce2972a7b0ec73fb27142b4ef7ef2ee78ef16 Mon Sep 17 00:00:00 2001 From: yystopf Date: Wed, 25 Jun 2025 16:44:44 +0800 Subject: [PATCH] =?UTF-8?q?fixed:=20=E8=BF=94=E5=9B=9E=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/api/v1/projects/pulls/pulls_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/v1/projects/pulls/pulls_controller.rb b/app/controllers/api/v1/projects/pulls/pulls_controller.rb index 34a67c300..c8a1d0cab 100644 --- a/app/controllers/api/v1/projects/pulls/pulls_controller.rb +++ b/app/controllers/api/v1/projects/pulls/pulls_controller.rb @@ -17,9 +17,9 @@ class Api::V1::Projects::Pulls::PullsController < Api::V1::BaseController can_merge = @project&.pull_requests.where(head: @pull_request.head, base: @pull_request.base, status: 0, is_original: @pull_request.is_original, fork_project_id: @pull_request.fork_project_id) if can_merge.present? render json: { - status: -2, + status: -1, redirect_url:"/#{@project.owner.login}/#{@project.identifier}/pulls/#{can_merge.first.gitea_number}", - message: "在这些分支之间的合并请求已存在:#{can_merge.first.try(:title)}", + message: "在这些分支之间的合并请求已存在", } else @result_object = Api::V1::Projects::Pulls::ReopenService.call(@project, @pull_request, current_user)