mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-20 11:45:57 +08:00
fixed 组织流水线列表接口,组织内所有仓库,分组显示
This commit is contained in:
@@ -5,7 +5,7 @@ class Api::Pm::PipelinesController < Api::Pm::BaseController
|
||||
def index
|
||||
@owner = Owner.find_by(login: params[:owner_id].to_s) || Owner.find_by(id: params[:owner_id].to_s)
|
||||
tip_exception('组织未找到') if @owner.blank?
|
||||
project_ids = @owner.projects.ids
|
||||
@project_ids = @owner.projects.ids
|
||||
project_gpids = @owner.projects.pluck(:gpid)
|
||||
action_runs = Gitea::ActionRun.where(owner_id: @owner.gitea_uid)
|
||||
group_data = action_runs.where(status: [1,2]).group(:workflow_id, :status).count
|
||||
@@ -64,7 +64,8 @@ class Api::Pm::PipelinesController < Api::Pm::BaseController
|
||||
end
|
||||
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 = Action::Pipeline.where(project_id: @project_ids).order(updated_at: :desc)
|
||||
@pipelines = @pipelines
|
||||
@pipelines = paginate @pipelines
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user