Browse Source

fixed 组织流水线列表接口,组织内所有仓库,分组显示,搜索

pull/348/head^2^2
xxq250 1 year ago
parent
commit
68b08d8ca4
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/controllers/api/pm/pipelines_controller.rb

+ 2
- 2
app/controllers/api/pm/pipelines_controller.rb View File

@@ -65,8 +65,8 @@ class Api::Pm::PipelinesController < Api::Pm::BaseController
Rails.logger.info("@run_result======#{@run_result}")
@disabled_workflows = Gitea::RepoUnit.where(repo_id: project_gpids, type: 10).where("config is not null")
@pipelines = Action::Pipeline.where(project_id: @project_ids).order(updated_at: :desc)
@pipelines = @pipelines.where("pipeline_name like ?", "%#{param[:pipeline_name]}%") if param[:pipeline_name].present?
@pipelines = @pipelines.where(pipeline_type: param[:pipeline_type]) if param[:pipeline_type].present?
@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?
@pipelines = @pipelines
@pipelines = paginate @pipelines
end


Loading…
Cancel
Save