Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2016-09-19 12:30:55 +0300
committerTimothy Andrew <mail@timothyandrew.net>2016-09-19 12:30:55 +0300
commit4531e433ad33e67cb66abaa4626b5e608eb11f11 (patch)
treee2199500817186477599b226f32d5acb778a2cc0 /app/models/cycle_analytics.rb
parent2cddd02ec5dd9d27fc9e9b6ac5e0748fe92e1cff (diff)
Make changes to the cycle analytics JSON endpoint.
1. Add `summary` section. 2. `stats` is `null` if no stats are present. 3. `stats` and `summary` are both arrays.
Diffstat (limited to 'app/models/cycle_analytics.rb')
-rw-r--r--app/models/cycle_analytics.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/cycle_analytics.rb b/app/models/cycle_analytics.rb
index 5f09e5d611b..d4f682c4a33 100644
--- a/app/models/cycle_analytics.rb
+++ b/app/models/cycle_analytics.rb
@@ -4,6 +4,11 @@ class CycleAnalytics
def initialize(project, from:)
@project = project
@from = from
+ @summary = Summary.new(project, from: from)
+ end
+
+ def summary
+ @summary
end
def issue