summaryrefslogtreecommitdiff
path: root/lib/ci/charts.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ci/charts.rb')
-rw-r--r--lib/ci/charts.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ci/charts.rb b/lib/ci/charts.rb
index 915a4f526a6..5ff7407c6fe 100644
--- a/lib/ci/charts.rb
+++ b/lib/ci/charts.rb
@@ -60,7 +60,8 @@ module Ci
class BuildTime < Chart
def collect
- commits = project.commits.joins(:builds).where("#{Ci::Build.table_name}.finished_at is NOT NULL AND #{Ci::Build.table_name}.started_at is NOT NULL").last(30)
+ commits = project.commits.last(30)
+
commits.each do |commit|
@labels << commit.short_sha
@build_times << (commit.duration / 60)