Skip to content
Snippets Groups Projects
Commit 50e62b3e authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files
parent 05faeec7
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -231,7 +231,7 @@ class Commit
 
def status
return @status if defined?(@status)
@status ||= pipelines.order(:id).last.try(:status)
@status ||= pipelines.status
end
 
def revert_branch_name
Loading
Loading
Loading
Loading
@@ -20,7 +20,7 @@ module HasStatus
skipped = scope.skipped.select('count(*)').to_sql
 
deduce_status = "(CASE
WHEN (#{builds})=0 THEN NULL
WHEN (#{builds})=(#{created}) THEN NULL
WHEN (#{builds})=(#{skipped}) THEN 'skipped'
WHEN (#{builds})=(#{success})+(#{ignored})+(#{skipped}) THEN 'success'
WHEN (#{builds})=(#{created})+(#{pending})+(#{skipped}) THEN 'pending'
Loading
Loading
Loading
Loading
@@ -110,7 +110,7 @@ describe API::API, api: true do
get api("/projects/#{project.id}/repository/commits/#{project.repository.commit.id}", user)
 
expect(response).to have_http_status(200)
expect(json_response['status']).to eq('created')
expect(json_response['status']).to be_nil
end
end
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment