From 3236bb37b07a999c7330397546f3e2a3861e9f44 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Wed, 9 Apr 2025 15:13:13 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20=E6=B5=81=E6=B0=B4=E7=BA=BF=E7=A6=81?= =?UTF-8?q?=E7=94=A8=E7=8A=B6=E6=80=81=E6=9C=80=E5=90=8E=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/api/v1/projects/pipelines_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/v1/projects/pipelines_controller.rb b/app/controllers/api/v1/projects/pipelines_controller.rb index d8ec37083..74b433d5a 100644 --- a/app/controllers/api/v1/projects/pipelines_controller.rb +++ b/app/controllers/api/v1/projects/pipelines_controller.rb @@ -8,8 +8,6 @@ class Api::V1::Projects::PipelinesController < Api::V1::BaseController @action_runs = Gitea::ActionRun.where(repo_id: @project.gpid) group_data = @action_runs.where(status: [1,2]).group(:workflow_id, :status).count db_files = pipelines.pluck(:file_name) - disabled_config = Gitea::RepoUnit.where(repo_id: @project.gpid, type: 10)&.first&.config - @disabled_workflows = disabled_config.present? ? JSON.parse(disabled_config)["DisabledWorkflows"] : [] @run_result = [] @files.map { |i| i['name'] }.each do |file| unless db_files.include?(".gitea/workflows/#{file}") @@ -58,6 +56,8 @@ class Api::V1::Projects::PipelinesController < Api::V1::BaseController }.merge(last_action_run_json) end Rails.logger.info("@run_result======#{@run_result}") + disabled_config = Gitea::RepoUnit.where(repo_id: @project.gpid, type: 10)&.first&.config + @disabled_workflows = disabled_config.present? ? JSON.parse(disabled_config)["DisabledWorkflows"] : [] @pipelines = Action::Pipeline.where(project_id: @project.id).order(updated_at: :desc) @pipelines = paginate @pipelines end