fixed 组织流水线按仓库分页sql
This commit is contained in:
parent
b4da913f2b
commit
492561c405
|
@ -68,7 +68,7 @@ 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.select("distinct project_id,max(updated_at) as updated_at")
|
||||
.where(project_id: @project_ids).group(:project_id).order(updated_at: :desc)
|
||||
.where(project_id: @project_ids).group(: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?
|
||||
@pipelines = kaminari_paginate(@pipelines)
|
||||
|
|
Loading…
Reference in New Issue