From cf72921eb1a970b2fca6845268b3de0af7bff6cd Mon Sep 17 00:00:00 2001 From: xxq250 Date: Mon, 17 Mar 2025 11:35:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E6=B0=B4=E7=BA=BF=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=96=B0=E6=8E=A5=E5=8F=A3,=E5=90=8C=E6=AD=A5=E5=90=AF?= =?UTF-8?q?=E7=94=A8=E7=A6=81=E7=94=A8=E7=8A=B6=E6=80=81?= 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, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/v1/projects/pipelines_controller.rb b/app/controllers/api/v1/projects/pipelines_controller.rb index 16e01b853..78b0b2e76 100644 --- a/app/controllers/api/v1/projects/pipelines_controller.rb +++ b/app/controllers/api/v1/projects/pipelines_controller.rb @@ -11,11 +11,13 @@ class Api::V1::Projects::PipelinesController < Api::V1::BaseController @run_result = [] @files.map { |i| i['name'] }.each do |file| unless db_files.include?(".gitea/workflows/#{file}") + disabled_config = Gitea::RepoUnit.where(repo_id: @project.gpid, type: 10)&.first&.config + disabled_workflows = disabled_config.present? ? JSON.parse(disabled_config)["DisabledWorkflows"] : [] pipeline = Action::Pipeline.new(pipeline_name: file.to_s.gsub(".yml", "").gsub(".yaml", ""), file_name: ".gitea/workflows/#{file}", branch: @project.default_branch, is_graphic_design: false, - disable: false, + disable: disabled_workflows.include?(file.to_s), project_id: @project.id) interactor = Repositories::EntriesInteractor.call(@owner, @project.identifier, ".gitea/workflows/#{file}", ref: @project.default_branch) if interactor.success?