mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-22 12:45:46 +08:00
fixed: 流水线批量查询运行数据
This commit is contained in:
@@ -3,8 +3,8 @@ class Api::V1::Projects::Actions::ActionsController < Api::V1::Projects::Actions
|
||||
def new_index
|
||||
@files = $gitea_client.get_repos_contents_by_owner_repo_filepath(@project&.owner&.login, @project&.identifier, ".gitea/workflows")
|
||||
puts @files
|
||||
@action_runs = Gitea::ActionRun.where(repo_id: @project.gpid, status: [1,2])
|
||||
group_data = @action_runs.group(:workflow_id, :status).count
|
||||
@action_runs = Gitea::ActionRun.where(repo_id: @project.gpid)
|
||||
group_data = @action_runs.where(status: [1,2]).group(:workflow_id, :status).count
|
||||
@result = []
|
||||
@files.map{|i|i['name']}.each do |file|
|
||||
last_action_run = @action_runs.where(workflow_id: file).order(updated: :desc).first
|
||||
|
||||
Reference in New Issue
Block a user