Browse Source

FIX 发送pr时,分支对比功能添加gitea 接口支持(pr_merge api)

pull/278/head
jasder 4 years ago
parent
commit
3e633ea6cc
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      app/controllers/pull_requests_controller.rb

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

@@ -182,7 +182,12 @@ class PullRequestsController < ApplicationController
message: "在这些分支之间的合并请求已存在:<a href='/projects/#{@owner.login}/#{@project.identifier}/pulls/#{can_merge.first.id}/Messagecount''>#{can_merge.first.try(:title)}</a>",
}
else
normal_status(0, "可以合并")
compare_result = Repositories::CompareService.call(@owner, @project, params)
if compare_result['Diff'].blank?
normal_status(0, "可以合并")
else
normal_status(-2, "分支内容相同,无需创建合并请求")
end
end
end
end


Loading…
Cancel
Save