Browse Source

修复: pr查询缩小范围

pull/347/head
yystopf 1 year ago
parent
commit
ccb9b5f881
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/controllers/concerns/api/pull_helper.rb

+ 1
- 1
app/controllers/concerns/api/pull_helper.rb View File

@@ -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…
Cancel
Save