Skip to content
Snippets Groups Projects
Commit ee86182f authored by Kamil Trzcinski's avatar Kamil Trzcinski
Browse files

Use builds_without_retry to calculate average coverage

parent 0261c8f1
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -211,8 +211,8 @@ class Commit < ActiveRecord::Base
end
 
def coverage
if project.coverage_enabled? && builds.count(:all) > 0
coverage_array = builds.map(&:coverage).compact
if project.coverage_enabled?
coverage_array = builds_without_retry.map(&:coverage).compact
if coverage_array.size >= 1
'%.2f' % (coverage_array.reduce(:+) / coverage_array.size)
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