ADD build status with killed
This commit is contained in:
parent
66efdcc1b6
commit
5375c3ec71
|
@ -2745,7 +2745,7 @@ http://localhost:3000/api/Jason/forge/builds | jq
|
|||
|repo |是|string |项目identifier |
|
||||
|page |否|string |页数,第几页 |
|
||||
|limit |否|string |每页多少条数据,默认20条 |
|
||||
|search |是|string |构建状态条件过滤; 值说明:pending: 准备中,failure: 构建失败,running: 运行中,error:构建失败(.trustie-pipeline.yml文件错误),success: 构建成功 |
|
||||
|search |是|string |构建状态条件过滤; 值说明:pending: 准备中,failure: 构建失败,running: 运行中,error:构建失败(.trustie-pipeline.yml文件错误),success: 构建成功,killed: 撤销构建 |
|
||||
|
||||
*返回参数说明:*
|
||||
|
||||
|
|
|
@ -9,5 +9,6 @@ class Ci::Build < Ci::RemoteBase
|
|||
scope :running, -> { by_status('running') }
|
||||
scope :errored, -> { by_status('error') }
|
||||
scope :pending, -> { by_status('pending') }
|
||||
scope :killed, -> { by_status('killed') }
|
||||
scope :by_status, ->(status) { where(build_status: status) }
|
||||
end
|
||||
|
|
|
@ -20,6 +20,7 @@ class Ci::Builds::ListQuery < ApplicationQuery
|
|||
when 'error' then scope.errored
|
||||
when 'running' then scope.running
|
||||
when 'failure' then scope.failed
|
||||
when 'killed' then scope.killed
|
||||
else
|
||||
scope
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue