mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
FIX code review
This commit is contained in:
@@ -13,21 +13,16 @@ class Ci::Builds::ListQuery < ApplicationQuery
|
||||
def call
|
||||
scope = @repo.builds
|
||||
|
||||
scope =
|
||||
builds =
|
||||
case params[:search]
|
||||
when 'success'
|
||||
scope.successed
|
||||
when 'pending'
|
||||
scope.pending
|
||||
when 'error'
|
||||
scope.errored
|
||||
when 'running'
|
||||
scope.running
|
||||
when 'failure'
|
||||
scope.failed
|
||||
when 'success' then scope.successed
|
||||
when 'pending' then scope.pending
|
||||
when 'error' then scope.errored
|
||||
when 'running' then scope.running
|
||||
when 'failure' then scope.failed
|
||||
else
|
||||
scope
|
||||
end
|
||||
custom_sort(scope, params[:sort_by], params[:sort_direction])
|
||||
custom_sort(builds, params[:sort_by], params[:sort_direction])
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user