FIX 发送pr时,分支对比功能添加gitea 接口支持(pr_merge api)
This commit is contained in:
parent
4fe3f88de6
commit
3e633ea6cc
|
@ -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>",
|
message: "在这些分支之间的合并请求已存在:<a href='/projects/#{@owner.login}/#{@project.identifier}/pulls/#{can_merge.first.id}/Messagecount''>#{can_merge.first.try(:title)}</a>",
|
||||||
}
|
}
|
||||||
else
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue