forked from Gitlink/forgeplus
Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop
This commit is contained in:
commit
55f60bf062
|
@ -20,9 +20,9 @@ class Api::V1::Projects::CompareController < Api::V1::BaseController
|
|||
|
||||
def gitea_compare_files(base, head)
|
||||
if params[:filepath].present?
|
||||
$gitea_hat_client.get_repos_compare_files_by_owner_repo_baseref_headref_filepath(@project&.owner&.login, @project.identifier, Addressable::URI.escape(base), Addressable::URI.escape(head), CGI.escape(params[:filepath]), {query: {token: current_user&.gitea_token}})
|
||||
$gitea_hat_client.get_repos_compare_by_owner_repo_baseref_headref(@project&.owner&.login, @project.identifier, Addressable::URI.escape(base), Addressable::URI.escape(head), {query: {token: current_user&.gitea_token, isFiles: true, filepath: params[:filepath]}})
|
||||
else
|
||||
$gitea_hat_client.get_repos_compare_files_by_owner_repo_baseref_headref(@project&.owner&.login, @project.identifier, Addressable::URI.escape(base), Addressable::URI.escape(head), {query: {page:page,limit:limit,token: current_user&.gitea_token}})
|
||||
$gitea_hat_client.get_repos_compare_by_owner_repo_baseref_headref(@project&.owner&.login, @project.identifier, Addressable::URI.escape(base), Addressable::URI.escape(head), {query: {page:page,limit:limit,token: current_user&.gitea_token, isFiles: true}})
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ module Api::PullHelper
|
|||
|
||||
def load_pull_request
|
||||
pull_request_id = params[:pull_id] || params[:id]
|
||||
@pull_request = @project.pull_requests.where(gitea_number: pull_request_id).where.not(id: pull_request_id).take || PullRequest.find_by_id(pull_request_id)
|
||||
@pull_request = @project.pull_requests.where(gitea_number: pull_request_id).where.not(id: pull_request_id).take || @project.pull_requests.find_by_id(pull_request_id)
|
||||
@issue = @pull_request&.issue
|
||||
if @pull_request
|
||||
logger.info "###########pull_request founded"
|
||||
|
|
Loading…
Reference in New Issue