Commit af7d3836 authored by Lin Jen-Shin's avatar Lin Jen-Shin

should show the status of the latest one

parent 6baf9971
......@@ -231,7 +231,7 @@ class Commit
def status
return @status if defined?(@status)
@status ||= pipelines.status
@status ||= pipelines.order(:id).last.try(:status)
end
def revert_branch_name
......
......@@ -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 be_nil
expect(json_response['status']).to eq('created')
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment