Browse Source

fixed 组织流水线中多仓库隔离,分页

pull/348/head^2^2
xxq250 1 year ago
parent
commit
44396e444b
2 changed files with 2 additions and 1 deletions
  1. +1
    -1
      app/controllers/api/v1/projects/pipelines_controller.rb
  2. +1
    -0
      app/views/api/v1/projects/pipelines/index.json.jbuilder

+ 1
- 1
app/controllers/api/v1/projects/pipelines_controller.rb View File

@@ -59,7 +59,7 @@ class Api::V1::Projects::PipelinesController < Api::V1::BaseController
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
@pipelines = kaminari_paginate(@pipelines)
end

def test_yaml


+ 1
- 0
app/views/api/v1/projects/pipelines/index.json.jbuilder View File

@@ -1,5 +1,6 @@
json.status 0
json.message "success"
json.count @pipelines.total_count

json.pipelines @pipelines.each do |pipeline|
json.extract! pipeline, :id, :pipeline_name, :pipeline_status, :description, :file_name, :is_graphic_design,


Loading…
Cancel
Save