summaryrefslogtreecommitdiff
path: root/db
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'zj-gitorious-migration-empty-pg-database' into 'master' Rémy Coutable2016-09-061-2/+1
| | | | | | | Support empty PG database too cc @rdavila @axil See merge request !6221
* Merge branch 'zj-drop-gitorious-field' into 'master' Rubén Dávila Santos2016-09-051-0/+40
| | | | | | | | | | | Remove gitorious from import_sources on ApplicationSetting model Removes 'gitorious' as import field from the import_sources field on ApplicationSetting Closes #21804 cc @markglenfletcher See merge request !6180
* Merge branch 'fix-confidential-issues-webhooks' into 'master'Douwe Maan2016-09-054-25/+72
| | | | | | | | | | Scope webhooks/services that will run for confidential issues Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/20661 See merge request !1986 Conflicts: db/schema.rb
* Revert "Merge branch 'lock_fix' into 'master'"Ruben Davila2016-08-312-18/+2
| | | | This reverts commit d836a359b7a9eee7dd379a99022e3bb709cd9995.
* Revert "Merge branch 'sh-lock-version-not-null' into 'master' "Ruben Davila2016-08-312-14/+1
| | | | This reverts commit ff39ccfc3fe12d8974da39cdadae674f28afd0ec.
* Merge branch 'sh-lock-version-not-null' into 'master' Stan Hu2016-08-312-1/+14
| | | | | | | Remove not-null constraint on lock_version column if it exists Closes #21678 See merge request !6118
* Merge branch 'lock_fix' into 'master'Stan Hu2016-08-312-2/+18
| | | | | | | | | | | | | | Remove default value for lock_version From the very beginning we added `lock_version` column with default value, then we reverted that MR. A bit later we added that migration again but column's default value has been removed from migration. So if you installed GitLab form master it's possible that you have default value, which caused the bug. We don't need to change a CHANGELOG here I think. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/21527 and https://dev.gitlab.org/gitlab/organization/issues/971 See merge request !6111 Conflicts: db/schema.rb
* Merge branch 'fix-diff-note-discussion-id' into 'master' Rubén Dávila Santos2016-08-193-1/+28
| | | | | | | Call `set_discussion_id` again in DiffNote `before_validation` because the order is important See merge request !5913
* Merge branch 'gokmengoksel/gitlab-ce-koding' into 'master' Stan Hu2016-08-192-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Koding Integration ## What does this MR do? Will provide Koding integration with GitLab services. Forked from !4914. ## Are there points in the code the reviewer needs to double check? I've introduced new layouts which might not be necessary, first time contributor. ## Why was this MR needed? We're planning to ship Koding with GitLab. ## What are the relevant issue numbers? #12759 #14698 ## Screenshots (if relevant) ### Screencasts http://recordit.co/BDMbhwgxPD http://recordit.co/By0qiz1ClC ### Enable Koding in Application Settings ![image](/uploads/73a69421105c03aa2b0b47e2617d3fbc/image.png) ### Koding Dashboard ![image](/uploads/6c7dda34792280c0e4791e36af4eba11/image.png) ### Set up Koding Stack 1 - ![image](/uploads/d5c2b93f8e61b5cbffdb06f0267d485f/image.png) 2 - ![image](/uploads/44d9a9b574b8ac0c5eb553fb9653d5da/image.png) ### Run on Koding on Project Page ![image](/uploads/7d2b46221009074ffff75d66d5a1a555/image.png) ### Run in IDE on Merge Requests ![image](/uploads/65eed90c34c34b5fe7ad29ef9c717640/image.png) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5909
* Merge branch 'pipeline-hooks-without-slack' into 'master' Robert Speicher2016-08-193-0/+34
| | | | | | | Implement pipeline hooks, extracted from !5525 Closes #20115 See merge request !5620
* Merge branch 'expiration-date-on-memberships' into 'master' Douwe Maan2016-08-193-2/+62
| | | | | | | Expiration date on memberships Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/17495 See merge request !5876
* Merge branch 'diff-line-comment-vuejs' into 'master' Douwe Maan2016-08-193-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Diff line comments resolve ## What does this MR do? Diff line comments can be resolved. Part of #10325 To do: - [x] Backend (@DouweM) - [x] Fix https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5022#note_13319326. Will be made easier by https://gitlab.com/gitlab-org/gitlab-ce/issues/17237#note_13370331 - [x] System note when all discussions are resolved - [x] Notification when all discussions are resolved - [x] Write unit tests - [x] Look at resolve time https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5022#note_13912743 - Fixed by 4a13aa9 - [x] Frontend (@iamphill) - [x] Fix bugs - [x] Write more feature tests - [x] Frontend (@connorshea) - [x] Address frontend feedback - [x] Feature specs for Jump feature - [x] Documentation - [x] Add Vue.js in a standard way See merge request !5022
* Merge branch '17334-u2f-device-identifiers' into 'master' Robert Speicher2016-08-182-1/+31
| | | | | | | | | | | | | | | | Allow naming (and deleting) U2F devices. ## What does this MR do? - Allow giving each U2F device a name (at the time of registration). - Allow deleting individual U2F devices. - Display a list of registered U2F devices. ## What are the relevant issue numbers? - Closes #17334 - Closes #17335 See merge request !5833
* Merge branch '18141-pipeline-graph' into 'master' Jacob Schatz2016-08-181-5/+4
| | | | | | | | | | | | | | | | Add pipeline graph ## What does this MR do? Adds pipeline visualization ## What are the relevant issue numbers? Closes #18141 Part of #19982 ## Screenshots (if relevant) ![Screen_Shot_2016-08-16_at_7.59.52_PM](/uploads/c9dd695d2ddbd2a85e98a5b4e500d52c/Screen_Shot_2016-08-16_at_7.59.52_PM.png) ![Screen_Shot_2016-08-16_at_7.55.49_PM](/uploads/5ab548cc5fc8a42371d3b54108798c02/Screen_Shot_2016-08-16_at_7.55.49_PM.png) See merge request !5742
* Merge branch '18681-pipelines-merge-request' into 'master' Jacob Schatz2016-08-171-6/+26
| | | | | | | | | | | | | | Resolve "Pipelines for merge request" ## What does this MR do? Adds `Pipelines` tab in merge request view ## What are the relevant issue numbers? Closes #18681 ## Screenshots (if relevant) ![Screen_Shot_2016-08-16_at_3.22.41_PM](/uploads/c04febab3765b1fac2bf3bbfb9882f9f/Screen_Shot_2016-08-16_at_3.22.41_PM.png) See merge request !5485
* Merge branch 'issue-boards' into 'master'Douwe Maan2016-08-174-0/+68
| | | | | | | | | | | | | | | | | | | | | | Issue boards - Issue: #17907 - Issue backend: #20335 - Backend MR: !5548 - Frontend MR: !5554 - Documentation !5713 - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [X] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - [X] ~~API support added~~ - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5548
* Merge branch 'akismet-submittable' into 'master' Robert Speicher2016-08-154-1/+78
|\ | | | | | | | | | | | | Submit to Akismet Part 1 (Issues) Related to #5932 #5573 gitlab-com/infrastructure#14 See merge request !5538
| * Further refactor and syntax fixes.Patricio Cano2016-08-152-2/+2
| |
| * Refactored AkismetHelper into AkismetService and cleaned up `Spammable`Patricio Cano2016-08-152-1/+6
| | | | | | | | - Refactored SpamCheckService into SpamService
| * Allow `Issue` to be submitted as spamPatricio Cano2016-08-152-0/+2
| | | | | | | | | | - Added controller actions as reusable concerns - Added controller tests
| * Allow `SpamLog` to be submitted as hamPatricio Cano2016-08-152-0/+21
| | | | | | | | | | - Added `submitted_as_ham` to `SpamLog` to mark which logs have been submitted to Akismet. - Added routes and controller action.
| * Refactored spam related code even furtherPatricio Cano2016-08-152-1/+29
| | | | | | | | | | | | | | - Removed unnecessary column from `SpamLog` - Moved creation of SpamLogs out of its own service and into SpamCheckService - Simplified code in SpamCheckService. - Moved move spam related code into Spammable concern
| * Lay the ground works to submit information to AkismetPatricio Cano2016-08-152-0/+21
| | | | | | | | | | | | - New concern `AkismetSubmittable` to allow issues and other `Spammable` models to be submitted to Akismet. - New model `UserAgentDetail` to store information needed for Akismet. - Services needed for their creation and tests.
* | Merge branch 'fix/build-seeds-in-development-environment' into 'master' Grzegorz Bizon2016-08-151-30/+29
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix pipeline and build seeds in development environment ## What does this MR do? When we depend on state machine events in seeds, it is likely that we will break fixtures from time to time because when transition rules change, using events most likely invalidates some objects in seeds ## Why was this MR needed? Pipeline and build seeds were broken in development environment. ## What are the relevant issue numbers? Closes #20933 See merge request !5810
| * Fix pipeline and build seeds in development environmentGrzegorz Bizon2016-08-151-30/+29
| | | | | | | | | | | | When we depend on state machine events in seeds, it is likely that we will break fixtures from time to time because when transition rules change, using events most likely invalidates some objects in seeds.
* | Merge branch 'zj-deployment-status-on-mr' into 'master' Douwe Maan2016-08-151-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Show deployment status on a MR view ## What are the relevant issue numbers? Resolves #19571, one in the list of #19992 ## Screenshots (if relevant) external_url = nil ![Screen_Shot_2016-08-02_at_13.57.03](/uploads/20ea1587eea556c7a1acd0ff726a5bfb/Screen_Shot_2016-08-02_at_13.57.03.png) external_url != nil ![Screen_Shot_2016-08-02_at_13.59.59](/uploads/0094b9ddece3f4bf76c83988840c096d/Screen_Shot_2016-08-02_at_13.59.59.png) Note, the timings are weird between merging and deploying, that is because I did it in the wrong order. ## Does this MR meet the acceptance criteria? - [X] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - Tests - [x] Added for this feature/bug - [x] All builds are passing See merge request !5622
| * Method names changed to #includes_commit?zj-deployment-status-on-mrZ.J. van de Weg2016-08-121-1/+1
| |
* | Fix bug where destroying a namespace would not always destroy projectsStan Hu2016-08-113-2/+22
|/ | | | | | | | | | | | | | | | | | | There is a race condition in DestroyGroupService now that projects are deleted asynchronously: 1. User attempts to delete group 2. DestroyGroupService iterates through all projects and schedules a Sidekiq job to delete each Project 3. DestroyGroupService destroys the Group, leaving all its projects without a namespace 4. Projects::DestroyService runs later but the can?(current_user, :remove_project) is `false` because the user no longer has permission to destroy projects with no namespace. 5. This leaves the project in pending_delete state with no namespace/group. Projects without a namespace or group also adds another problem: it's not possible to destroy the container registry tags, since container_registry_path_with_namespace is the wrong value. The fix is to destroy the group asynchronously and to run execute directly on Projects::DestroyService. Closes #17893
* Merge branch 'refactor-builds-creation-service' into 'master' Rémy Coutable2016-08-112-0/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor pipeline creation service ## What does this MR do? This refactors GitLab CI build processing: all builds for pipeline are pre-created when a pipeline object is created. The builds are created with a new introduced status `created`. The builds are then automatically promoted to `pending` when a previous stage do succeed. This significantly simplifies pipeline processing code solving a lot of problems of lazily initialisation of previous approach (builds were created on-demand). ## Why was this MR needed? The previous mechanism had a lot of flows (shown in related issues) in how it work, but also in code design. Removing cross model-service-library dependencies. The current approach moves a build creation to single place `CreatePipelineService` and removes a dynamic dependency on `config_processor` significantly simplifying a build creation and pipeline processing. Pipeline processing is implemented in `ProcessPipelineService`. This also allows to easily extend GitLab with Manual Actions which is part of 8.10 direction issue. ## Migration problem ~~This MR removes the a on-demand creation of builds in pipelines. Pipelines that are running and are in mid-stage (some stages started, but not all) will not be fully evaluated after application restart. This happens, because the code responsible for on-demand creation is removed. There's no easy way to migrate existing pipelines, other than doing offline migration and putting pipeline processing in migration code (which seems to be a really bad idea).~~ To support old pipelines I added a lazy initialization of builds if none is found. ## What are the relevant issue numbers? Fixes: https://gitlab.com/gitlab-org/gitlab-ce/issues/12839 Solves: https://gitlab.com/gitlab-org/gitlab-ce/issues/18644 https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/289 Allows to easily implement: https://gitlab.com/gitlab-org/gitlab-ce/issues/17010 ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] API support added - Tests - [x] Added for this feature/bug - [ ] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5295
| * Pre-create all builds for Pipeline when a trigger is receivedKamil Trzcinski2016-08-112-0/+10
| | | | | | | | | | | | | | | | | | | | | | This change simplifies a Pipeline processing by introducing a special new status: created. This status is used for all builds that are created for a pipeline. We are then processing next stages and queueing some of the builds (created -> pending) or skipping them (created -> skipped). This makes it possible to simplify and solve a few ordering problems with how previously builds were scheduled. This also allows us to visualise a full pipeline (with created builds). This also removes an after_touch used for updating a pipeline state parameters. Right now in various places we explicitly call a reload_status! on pipeline to force it to be updated and saved.
* | Remove various redundant indexesYorick Peterse2016-08-112-52/+116
|/ | | | | | | | | | | | | | | | | | | | | | | One can see which indexes are used in PostgreSQL by running the following query: SELECT relname as table_name, indexrelname as index_name, idx_scan, idx_tup_read, idx_tup_fetch, pg_size_pretty(pg_relation_size(indexrelname::regclass)) FROM pg_stat_all_indexes WHERE schemaname = 'public' AND "idx_scan" = 0 ORDER BY pg_relation_size(indexrelname::regclass) desc; Using this query I built a list of indexes that could be potentially removed. After checking every single one by hand to make sure they really aren't used I only found 1 index that _would_ be used. This was a GitLab GEO index (EE) specific that's currently not used simply because the table is empty. Apart from this one index all indexes could be removed. The migration also takes care of 6 composite indexes that can be replaced with a single column index, which in most cases was already present. For more information see gitlab-org/gitlab-ce#20767.
* Remove trigram indexes for "ci_runners"remove-ci-runner-trigram-indexesYorick Peterse2016-08-102-3/+28
| | | | | | | | | | | | These indexes are only used when you search for runners in the admin interface. This operation is so rarely used that it does not make sense to slow down every update in order to update the GIN trigram indexes. Removing these indexes should speed up queries such as those used for updating the last contact time of CI runners. Locally the timings of this query were reduced from ~50 ms to ~25 ms: UPDATE ci_runners SET updated_at = now(), contacted_at = now();
* Merge branch '20568-fix-member-data-again' into 'master' Douwe Maan2016-08-042-1/+22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a data migration to fix some missing timestamps in the members table (again) ## What does this MR do? Repeats an earlier migration to fix historic bad data in the members table (missing created_at and updated_at fields) ## Are there points in the code the reviewer needs to double check? I'm expecting the WHERE clauses to be fast enough, and to return few enough rows, that the migration doesn't need to use batches, but I'm not too familiar with the size of these tables in the wild, so perhaps that's a poor assumption. ## Why was this MR needed? 8.10 introduced a dependency on the `members.created_at` field in the project and namespace member view. If bad data is present, viewing the list of members now results in an NoMethodError and a 500 response from GitLab. Although the previous migration should have fixed all bad rows, we have evidence that it didn't in at least one case, despite the migration claiming to have run in the past. ## What are the relevant issue numbers? #20568 ## Screenshots (if relevant) ## Does this MR meet the acceptance criteria? - [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [ ] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) Closes #20568 See merge request !5670
| * Add missing DOWNTIME constant to the AddTimestampsToMembersAgain migrationNick Thomas2016-08-041-0/+1
| |
| * Add a data migration to fix some missing timestamps in the members table (again)Nick Thomas2016-08-042-1/+21
| |
* | Merge branch '20609-fix-protected-branch-access-levels-migration' into 'master' Douwe Maan2016-08-042-4/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Migrate protected branch access levels to match constants in `Gitlab::Access` Closes #20606 Context: https://gitlab.com/gitlab-org/gitlab-ce/issues/20606#note_13561628 See merge request !5658
| * | Migrate protected branch access levels to match constants in `Gitlab::Access`20609-fix-protected-branch-access-levels-migrationTimothy Andrew2016-08-042-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - In the final round of review (!5081), we moved the protected branch access levels from Rails enums to constants from Gitlab::Access. - The migrations that moved us from the old data model (a single protected_branches table with developers_can_push and developers_can_merge flags) to the new one (separate tables for push_access_levels and merge_access_levels) was not updated. - These migrations still used 0 to mean "Masters" and 1 to mean "Developers" (matching the previous Rails enum), while Gitlab::Access uses 40 and 30 for these, respectively. - Once the migrations run, our data gets into a broken state. - We fix this by migrating all `0`s to `40` and all `1`s to `30`. - https://gitlab.com/gitlab-org/gitlab-ce/issues/20606#note_13561628 = Caveats = - In Gitlab::Access, 0 represents NO_ACCESS. When we run this migration, all protected branches with "No one" as an access level will be changed to "Masters"
* | | Merge branch 'fix-add-column-with-default-null' into 'master' Douwe Maan2016-08-042-2/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix `#down` for two protected branches-related migrations. - The migrations called `add_column_with_default` with a `null` option, which the Rails `add_column` method accepts. This fails because `add_column_with_default` expects an `allow_null` option instead. - The migrations have been fixed to use `allow_null`. See merge request !5660
| * | | Fix `#down` for two protected branches-related migrations.fix-add-column-with-default-nullTimothy Andrew2016-08-042-2/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | - The migrations called `add_column_with_default` with a `null` option, which the Rails `add_column` method accepts. This fails because `add_column_with_default` expects an `allow_null` option instead. - The migrations have been fixed to use `allow_null`.
* | | Merge branch 'fixtures-improvements' into 'master' Kamil Trzciński2016-08-041-24/+21
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | Improve CI fixtures cc @ayufan See merge request !5645
| * | Improve CI fixturesfixtures-improvementsZ.J. van de Weg2016-08-031-24/+21
| |/
* | Remove unnecessary index_projects_on_builds_enabled index from the projects ↵20491-remove-unnecessary-index_projects_on_builds_enabled-index-from-the-projects-tableAlejandro Rodríguez2016-08-032-2/+10
|/ | | | table
* Incorporate feedbackZ.J. van de Weg2016-07-292-4/+1
|
* Add an URL field to EnvironmentsZ.J. van de Weg2016-07-292-1/+14
| | | | | This MR adds a string (thus max 255 chars) field to the enviroments table to expose it later in other features.
* Implement final review comments from @rymai.Timothy Andrew2016-07-296-2/+46
| | | | | | | | | | | | | | | | 1. Instantiate `ProtectedBranchesAccessSelect` from `dispatcher` 2. Use `can?(user, ...)` instead of `user.can?(...)` 3. Add `DOWNTIME` notes to all migrations added in !5081. 4. Add an explicit `down` method for migrations removing the `developers_can_push` and `developers_can_merge` columns, ensuring that the columns created (on rollback) have the appropriate defaults. 5. Remove duplicate CHANGELOG entries. 6. Blank lines after guard clauses.
* Use `Gitlab::Access` to protected branch access levels.Timothy Andrew2016-07-293-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. It makes sense to reuse these constants since we had them duplicated in the previous enum implementation. This also simplifies our `check_access` implementation, because we can use `project.team.max_member_access` directly. 2. Use `accepts_nested_attributes_for` to create push/merge access levels. This was a bit fiddly to set up, but this simplifies our code by quite a large amount. We can even get rid of `ProtectedBranches::BaseService`. 3. Move API handling back into the API (previously in `ProtectedBranches::BaseService#translate_api_params`. 4. The protected branch services now return a `ProtectedBranch` rather than `true/false`. 5. Run `load_protected_branches` on-demand in the `create` action, to prevent it being called unneccessarily. 6. "Masters" is pre-selected as the default option for "Allowed to Push" and "Allowed to Merge". 7. These changes were based on a review from @rymai in !5081.
* Implement review comments from @dbalexandre.Timothy Andrew2016-07-296-56/+0
| | | | | | | | | | | | | | | | 1. Remove `master_or_greater?` and `developer_or_greater?` in favor of `max_member_access`, which is a lot nicer. 2. Remove a number of instances of `include Gitlab::Database::MigrationHelpers` in migrations that don't need this module. Also remove comments where not necessary. 3. Remove duplicate entry in CHANGELOG. 4. Move `ProtectedBranchAccessSelect` from Coffeescript to ES6. 5. Split the `set_access_levels!` method in two - one each for `merge` and `push` access levels.
* Add seeds for protected branches.Timothy Andrew2016-07-291-0/+12
|
* Add a series of migrations changing the model-level design of protected ↵Timothy Andrew2016-07-297-4/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | branch access levels. 1. Remove the `developers_can_push` and `developers_can_merge` boolean columns. 2. Add two new tables, `protected_branches_push_access`, and `protected_branches_merge_access`. Each row of these 'access' tables is linked to a protected branch, and uses a `access_level` column to figure out settings for the protected branch. 3. The `access_level` column is intended to be used with rails' `enum`, with `:masters` at index 0 and `:developers` at index 1. 4. Doing it this way has a few advantages: - Cleaner path to planned EE features where a protected branch is accessible only by certain users or groups. - Rails' `enum` doesn't allow a declaration like this due to the duplicates. This approach doesn't have this problem. enum can_be_pushed_by: [:masters, :developers] enum can_be_merged_by: [:masters, :developers]
* Remove project which can't be pulled while seedingZ.J. van de Weg2016-07-281-1/+0
| | | | [ci skip]