Commit graph

4 commits

Author SHA1 Message Date
Timothy Andrew
c0ecef79fe Fix the "Commits" section of the cycle analytics summary.
- The commit count was capped at 10, due to
  `Gitlab::Git::Repository#log` enforcing a limit, with the default set
  to 10.

- Reimplement a small portion of this `log` function to get just the
  data we need.
2016-09-26 18:38:40 +05:30
Timothy Andrew
918e589c2b Implement a second round of review comments from @DouweM.
- Don't use `TableReferences` - using `.arel_table` is shorter!
- Move some database-related code to `Gitlab::Database`
- Remove the `MergeRequest#issues_closed` and
  `Issue#closed_by_merge_requests`  associations. They were either
  shadowing or were too similar to existing methods. They are not being
  used anywhere, so it's better to remove them to reduce confusion.
- Use Rails 3-style validations
- Index for `MergeRequest::Metrics#first_deployed_to_production_at`
- Only include `CycleAnalyticsHelpers::TestGeneration` for specs that
  need it.
- Other minor refactorings.
2016-09-21 00:47:37 +05:30
Timothy Andrew
204419e9e9 Test the CycleAnalytics::Summary model. 2016-09-20 13:23:14 +05:30
Timothy Andrew
4531e433ad 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.
2016-09-19 15:00:55 +05:30