mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-20 19:55:56 +08:00
16 lines
766 B
Ruby
16 lines
766 B
Ruby
json.status 0
|
|
json.message "success"
|
|
|
|
json.pipelines @pipelines.each do |pipeline|
|
|
json.extract! pipeline, :id, :pipeline_name, :pipeline_status, :description, :file_name, :is_graphic_design,
|
|
:repo_name, :repo_identifier, :branch, :event, :sha, :disable, :json, :yaml, :created_at, :updated_at
|
|
repo_config = @disabled_workflows.select { |config| config.repo_id = pipeline.project.gpid }
|
|
if repo_config.present?
|
|
json.disable JSON.parse(repo_config.first.config)["DisabledWorkflows"].to_s.include?(pipeline.file_name.to_s.gsub(".gitea/workflows/", ""))
|
|
else
|
|
json.disable pipeline.disable
|
|
end
|
|
json.pipeline_type pipeline.pipeline_type
|
|
json.run_data @run_result.select { |result| result[:filename] == pipeline.file_name }.first
|
|
end
|