fixed: 合并请求路径修改

This commit is contained in:
yystopf 2025-11-05 16:56:46 +08:00
parent 6ec77f5e90
commit 6df20e669d
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ class CompareController < ApplicationController
@exist_pullrequest = @project.pull_requests.where(is_original: false, head: @base, base: @head, status: 0).take
end
if @exist_pullrequest.present?
return -2, "在这些分支之间的合并请求已存在:<a href='/#{@owner.login}/#{@project.identifier}/pulls/#{@exist_pullrequest.id}'>#{@exist_pullrequest.try(:title)}</a>"
return -2, "在这些分支之间的合并请求已存在:<a href='/#{@owner.login}/code/#{@project.identifier}/pulls/#{@exist_pullrequest.id}'>#{@exist_pullrequest.try(:title)}</a>"
else
if @compare_result["FilesCount"].to_i == 0 && @compare_result["CommitsCount"].to_i == 0
return -2, "分支内容相同,无需创建合并请求"