summaryrefslogtreecommitdiff
path: root/lib/charts.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/charts.rb')
-rw-r--r--lib/charts.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/charts.rb b/lib/charts.rb
index 93e81a5..2472050 100644
--- a/lib/charts.rb
+++ b/lib/charts.rb
@@ -16,10 +16,10 @@ module Charts
def push(from, to, format)
@labels << from.strftime(format)
@total << project.builds.
- where('? > builds.created_at AND builds.created_at > ?', to, from).
+ where('? > ci_builds.created_at AND ci_builds.created_at > ?', to, from).
count(:all)
@success << project.builds.
- where('? > builds.created_at AND builds.created_at > ?', to, from).
+ where('? > ci_builds.created_at AND ci_builds.created_at > ?', to, from).
success.count(:all)
end
end
@@ -59,7 +59,7 @@ module Charts
class BuildTime < Chart
def collect
- commits = project.commits.joins(:builds).where('builds.finished_at is NOT NULL AND builds.started_at is NOT NULL').last(30)
+ commits = project.commits.joins(:builds).where('ci_builds.finished_at is NOT NULL AND ci_builds.started_at is NOT NULL').last(30)
commits.each do |commit|
@labels << commit.short_sha
@build_times << (commit.duration / 60)