mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-07-14 22:24:36 +08:00
fixed 组织流水线列表接口
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
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
|
||||
Reference in New Issue
Block a user