Commit Graph

18 Commits

Author SHA1 Message Date
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 231a9f5b87 Fix rubocop spec.
And `scss_lint`
2016-09-20 18:26:31 +05:30
Timothy Andrew 71d4bf721b Implement (some) comments from @DouweM's review.
- Move things common to `Issue` and `MergeRequest` into `Issuable`
- Move more database-specific functions into `Gitlab::Database`
- Indentation changes and other minor refactorings.
2016-09-20 18:13:11 +05:30
Timothy Andrew 8957293d9b Implement review comments from @yorickpeterse
1. Change multiple updates to a single `update_all`

2. Use cascading deletes

3. Extract an average function for the database median.

4. Move database median to `lib/gitlab/database`

5. Use `delete_all` instead of `destroy_all`

6. Minor refactoring
2016-09-20 16:05:25 +05:30
Z.J. van de Weg 07fc2f852a Method names changed to #includes_commit? 2016-08-12 10:43:04 +02:00
Z.J. van de Weg b497b0ce3f Incorporate feedback 2016-08-11 21:29:57 +02:00
Z.J. van de Weg 49f72e705f Show deployment status on a MR view 2016-08-11 21:29:57 +02:00
Kamil Trzcinski e00da96c88 Improve manual actions code and add model, service and feature tests
Manual actions are accessible from:
- Pipelines
- Builds
- Environments
- Deployments
2016-07-18 14:46:20 +02:00
Kamil Trzcinski 3248c9fb56 Rename playable_actions to manual_actions 2016-07-18 14:44:21 +02:00
Kamil Trzcinski 7d0fe1f04e Add implementation of manual actions 2016-07-18 14:44:21 +02:00
Douwe Maan 8d7dc26d39 Support new diff notes on MRs with diff_refs 2016-07-06 18:51:00 -04:00
Kamil Trzcinski 6ace6d940a Use validate and required for environment and project 2016-06-15 15:09:50 +02:00
Kamil Trzcinski 9e487100b5 Validate project and environment instead of only requiring 2016-06-15 14:05:10 +02:00
Kamil Trzcinski 2541e50d7c Improve validations 2016-06-15 12:03:49 +02:00
Kamil Trzcinski 14a02a6a95 Improve design after review 2016-06-14 18:34:48 +02:00
Kamil Trzcinski 30877effb1 Test environment controller specs 2016-06-14 14:47:00 +02:00
Kamil Trzcinski 3ade826065 Add specs for models and services 2016-06-14 13:51:12 +02:00
Kamil Trzcinski 907c0e6796 Added initial version of deployments 2016-06-10 23:36:54 +02:00