From ed8593071fb7c4f23376772a0e7bc4a8401ce425 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Mon, 21 Apr 2025 17:05:08 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20=E7=BB=84=E7=BB=87=E6=B5=81=E6=B0=B4?= =?UTF-8?q?=E7=BA=BF=E6=8C=89=E4=BB=93=E5=BA=93=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/api/pm/pipelines/index.json.jbuilder | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/api/pm/pipelines/index.json.jbuilder b/app/views/api/pm/pipelines/index.json.jbuilder index 9322ae210..cd7051877 100644 --- a/app/views/api/pm/pipelines/index.json.jbuilder +++ b/app/views/api/pm/pipelines/index.json.jbuilder @@ -9,8 +9,8 @@ json.projects @pipelines.map(&:project_id).uniq.each do |project_id| json.identifier project.identifier json.name project.name json.url "#{Rails.application.config_for(:configuration)['platform_url']}/#{project.owner.name}/#{project.identifier}" - json.pipelines @pipelines.select { |p| p.project_id == project_id }.each do |id| - pipeline = Action::Pipeline.find_by(id: id) + pipelines = Action::Pipeline.where(project_id: @project.id).order(updated_at: :desc) + json.pipelines pipelines.each do |pipeline| json.extract! pipeline, :id, :project_id, :pipeline_name, :pipeline_status, :description, :file_name, :is_graphic_design, :repo_name, :repo_identifier, :branch, :event, :sha, :disable, :json, :yaml, :created_at, :updated_at repo_config = @disabled_workflows.select { |config| config.repo_id = pipeline.project.gpid }