流水线名称查询条件传递到子集

This commit is contained in:
xxq250 2026-06-17 16:06:03 +08:00
parent 0a4381de0a
commit 591804f4f3
1 changed files with 1 additions and 0 deletions

View File

@ -11,6 +11,7 @@ json.projects @pipelines.map(&:project_id).uniq.each do |project_id|
json.url "#{Rails.application.config_for(:configuration)['platform_url']}/#{project.owner.name}/#{project.identifier}"
pipelines = Action::Pipeline.where(project_id: project.id).order(updated_at: :desc)
pipelines = pipelines.where("pipeline_name like ?", "%#{params[:pipeline_name]}%") if params[:pipeline_name].present?
pipelines = pipelines.where(pipeline_type: params[:pipeline_type]) if params[:pipeline_type].present?
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