From 300dffd2a1bc9b47aa541ce1dbaa4feb2df99371 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Wed, 30 Aug 2023 15:43:51 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20=E5=88=86=E6=94=AF=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=97=B6=E6=9C=89=E5=BC=80=E5=90=AF=E7=9A=84pr=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E4=B8=80=E5=90=8C=E5=85=B3=E9=97=AD,=E6=95=B4?= =?UTF-8?q?=E7=90=86fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/api/v1/projects/branches_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/v1/projects/branches_controller.rb b/app/controllers/api/v1/projects/branches_controller.rb index a4794b61a..40f44fea5 100644 --- a/app/controllers/api/v1/projects/branches_controller.rb +++ b/app/controllers/api/v1/projects/branches_controller.rb @@ -50,7 +50,7 @@ class Api::V1::Projects::BranchesController < Api::V1::BaseController end def close_pull_requests_by(project, branch_name) - open_pull_requests = project.pull_requests.opening.where(head: branch_name).or(a.pull_requests.opening.where(base: branch_name)) + open_pull_requests = project.pull_requests.opening.where(head: branch_name).or(project.pull_requests.opening.where(base: branch_name)) if open_pull_requests.present? open_pull_requests.each do |pull_request| closed = PullRequests::CloseService.call(project.owner, project.repository, pull_request, current_user)