summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Make retry_lock to not be infiniteuse-optimistic-lockingKamil Trzcinski2016-10-271-3/+7
|
* Add tests for optimistic lockingKamil Trzcinski2016-10-261-5/+7
|
* Use optimistic lockingKamil Trzcinski2016-10-261-0/+13
|
* Merge branch 'fix-events-api' into 'master' Rémy Coutable2016-10-251-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix events order in users/:id/events endpoint ## What does this MR do? Order of events in contributions API is currently being lost, though docs are saying: > Get the contribution events for the specified user, sorted **from newest to oldest**. Order becomes different after `.merge(ProjectsFinder.new.execute(current_user))` call, so I moved ordering below this line. This MR also removes extra `.page(params[:page])` call in the method chain, since [`paginate(events)` already does it](https://gitlab.com/airat/gitlab-ce/blob/master/lib/api/helpers.rb#L112). See merge request !7039
| * Get rid of extra .page callAirat Shigapov2016-10-241-2/+1
| |
| * Fix events order in user contributions APIAirat Shigapov2016-10-241-1/+2
| |
* | Don't schedule ProjectCacheWorker unless neededproject-cache-worker-schedulingYorick Peterse2016-10-251-1/+8
| | | | | | | | | | | | This changes ProjectCacheWorker.perform_async so it only schedules a job when no lease for the given project is present. This ensures we don't end up scheduling hundreds of jobs when they won't be executed anyway.
* | Merge branch '23372-fix-ce-to-ee-merge-check-task' into 'master' Robert Speicher2016-10-254-101/+277
|\ \ | | | | | | | | | | | | | | | | | | Change the approach to check if patches apply cleanly Closes #23372 See merge request !6949
| * | Disable Rails/Output cop since it makes no sense here23372-fix-ce-to-ee-merge-check-taskRémy Coutable2016-10-241-0/+1
| | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * | Use File.write instead of File.open + File#writeRémy Coutable2016-10-241-1/+1
| | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * | Don't print out implementation detail stepRémy Coutable2016-10-241-1/+1
| | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * | Change the approach to check if patches apply cleanlyRémy Coutable2016-10-214-101/+276
| | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | Escape ref and path for relative links (!6050)winniehell2016-10-241-2/+2
| |/ |/|
* | Merge branch 'grapify-labels-api' into 'master' Rémy Coutable2016-10-241-53/+38
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Grapify the labels API Add the Grape-DSL to the labels API. Since the input validation messages are checked, two tests are modified slightly. ## What are the relevant issue numbers? Related to #22928 See merge request !7070
| * | Grapify the labels APIgrapify-labels-apiRobert Schilling2016-10-241-53/+38
| | |
* | | Merge branch 'grapify-builds-api' into 'master' Rémy Coutable2016-10-241-83/+79
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Grapify builds API ## What does this MR do? Add the Grape-DSL to the builds API. ## What are the relevant issue numbers? Related to #22928 The artifacts API directly downloads a file rather then returning a JSON entity. See merge request !6877
| * | | Grapify builds APIgrapify-builds-apiRobert Schilling2016-10-241-83/+79
| |/ /
* | | Added path parameter to Commits APILuis HGO2016-10-241-0/+2
| | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | Merge branch '21513-fix-branch-protection-api' into 'master' Douwe Maan2016-10-241-33/+15
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix branch protection API. ## What does this MR do? - Fixes the branch protection API. - Closes #21513 - EE Merge Request: gitlab-org/gitlab-ee!718 ## Tasks - [ ] #21513 !6215 Protected branches API bug - [x] Investigate - [x] Test + Fix - [x] Changelog - [x] MR - [x] Wait for build to pass - [x] Review - [x] Check for EE conflicts - [x] Create EE MR - [x] Refactor + Fix - [x] Rebase EE MR against EE master - [x] Wait for builds to pass - [x] Assign to dbalexandre/douwe - [x] Implement latest review comments - [x] Wait for Douwe's review - [x] Implement changes - [x] Port changes to EE MR - [x] Assign both back to Douwe - [ ] Wait for merge - [ ] Merge gitlab-org/gitlab-ee!718 See merge request !6215
| * | | Implement second round of review comments from @DouweM.Timothy Andrew2016-10-241-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Pass `developers_and_merge` and `developers_can_push` in `params` instead of using keyword arguments. - Refactor a slightly complex boolean check to a simple `nil?` check.
| * | | Implement review comments from @DouweM.Timothy Andrew2016-10-241-2/+2
| | | |
| * | | Fix branch protection API.Timothy Andrew2016-10-241-31/+16
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Previously, we were not removing existing access levels before creating new ones. This is not a problem for EE, but _is_ for CE, since we restrict the number of access levels in CE to 1. 2. The correct approach is: CE -> delete all access levels before updating a protected branch EE -> delete developer access levels if "developers_can_{merge,push}" is switched off 3. The dispatch is performed by checking if a "length: 1" validation is present on the access levels or not. 4. Another source of problems was that we didn't put multiple queries in a transaction. If the `destroy_all` passes, but the `update` fails, we should have a rollback. 5. Modifying the API to provide users direct access to CRUD access levels will make things a lot simpler. 6. Create `create/update` services separately for this API, which perform the necessary data translation, before calling the regular `create/update` services. The translation code was getting too large for the API endpoint itself, so this move makes sense.
* | | Add relative url support to routing contrainersDmitriy Zaporozhets2016-10-241-1/+12
|/ / | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Merge branch 'sh-fix-broken-label-controller' into 'master' Rémy Coutable2016-10-221-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix error in generating labels Attempting to generate default set of labels would result in an error: ArgumentError: wrong number of arguments (given 1, expected 0) Closes #23649 See merge request !7055
| * | Fix error in generating labelssh-fix-broken-label-controllerStan Hu2016-10-221-1/+1
| |/ | | | | | | | | | | | | | | | | Attempting to generate default set of labels would result in an error: ArgumentError: wrong number of arguments (given 1, expected 0) Closes #23649
* | Merge branch '23653-dont-clear-db-cache-every-release' into 'master' Yorick Peterse2016-10-221-1/+1
|\ \ | | | | | | | | | | | | Stop clearing the database cache on rake cache:clear See merge request !7056
| * | Stop clearing the database cache on rake cache:clearNick Thomas2016-10-221-1/+1
| |/
* | Fix documents and comments on Build API `scope`. #23146 #19131Lemures Lemniscati2016-10-221-2/+2
|/
* Merge branch ↵Valery Sizov2016-10-211-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '12622-backup-restore-doesn-t-clear-cache-resulting-in-missing-branches-and-tags' into 'master' Fix: Backup restore doesn't clear cache ## What does this MR do? Clears cache when we do backup restoring. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/12622 ## What are the relevant issue numbers? https://gitlab.com/gitlab-org/gitlab-ce/issues/12622 See merge request !7019
| * Fix: Backup restore doesn't clear cache12622-backup-restore-doesn-t-clear-cache-resulting-in-missing-branches-and-tagsValery Sizov2016-10-201-0/+2
| |
* | Don't use Hash#slice since it's not supported in Ruby 2.1fix-ruby-2-1-failuresRémy Coutable2016-10-201-3/+8
| | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Merge remote-tracking branch 'upstream/master' into ↵preserve-note_type-and-positionLin Jen-Shin2016-10-202-7/+10
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | preserve-note_type-and-position * upstream/master: Restrict ProjectCacheWorker jobs to one per 15 min Removed code from project members controller Make label API spec independent of order Refactoring find_commits functionality Differentiate the expire from leave event Remove pagination description from individual doc Fix a broken table in Project API doc Create project feature when project is created Simpler arguments passed to named_route on toggle_award_url helper method Fixed height of issue board blank state
| * Merge branch 'refactoring_find_commits_method' into 'master' Sean McGivern2016-10-201-5/+1
| |\ | | | | | | | | | | | | | | | | | | Refactoring find_commits method It's possible that `find_commits_by_message` return nil in array which is not OK. We have different checks outside of this method. This MR places all checks inside the method. See merge request !7000
| | * Refactoring find_commits functionalityValery Sizov2016-10-201-5/+1
| | |
| * | Differentiate the expire from leave eventCallum Dryden2016-10-201-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment we cannot see weather a user left a project due to their membership expiring of if they themselves opted to leave the project. This adds a new event type that allows us to make this differentiation. Note that is not really feasable to go back and reliably fix up the previous events. As a result the events for previous expire removals will remain the same however events of this nature going forward will be correctly represented.
* | | Preserve note_type and position for notes from emailsLin Jen-Shin2016-10-201-1/+3
|/ / | | | | | | Closes #23208
* | Merge branch 'feature/group-level-labels' into 'master' Douwe Maan2016-10-1916-81/+160
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add group level labels ## What does this MR do? Add group level labels. ## Are there points in the code the reviewer needs to double check? * `LabelsFinder` * `Gitlab::Gfm::ReferenceRewriter` * `Banzai::Filter::LabelReferenceFilter` ## Why was this MR needed? We'll be adding more feature that allow you to do cross-project management of issues. ## Screenshots (if relevant) * Group Labels ![Group Labels](/uploads/2244c06ad68eae4fb246fb4c81bf8060/2.png) * Project Labels ![Project Labels](/uploads/c5839516d2282b51f7418d9dadbeceb4/1.png) * Expanded references for group labels when moving issue to another project ![Expanded references for group labels when moving issue to another project](/uploads/0c9ab248a8420d4978d59349ae3d42e5/3.png) ## Does this MR meet the acceptance criteria? - [x] [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) - [x] API support added - Tests - [x] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] 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) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? #19997 See merge request !6425
| * | Use LabelsFinder on Fogbuz importerDouglas Barbosa Alexandre2016-10-191-1/+2
| | |
| * | Use LabelsFinder on Google Code importerDouglas Barbosa Alexandre2016-10-191-1/+2
| | |
| * | Rename Labels::CreateService to Labels::FindOrCreateServiceDouglas Barbosa Alexandre2016-10-194-4/+4
| | |
| * | Update specs to cope with new label types and prioritiesJames Lopez2016-10-194-12/+27
| | | | | | | | | | | | | | | | | | Fixed all related specs and also changed the logic to handle edge cases. This includes exporting and exporting of group labels, which will get associated with the new group (if any) or they will become normal project labels otherwise. Found other issues to do with not being able to import all labels at once in the beginning of the JSON - code was much simpler when we import all labels and milestones associated to a project first, then the associations will find the already created labels instead of creating them from the associations themselves.
| * | Fix GitHub importer specDouglas Barbosa Alexandre2016-10-191-1/+4
| | |
| * | User Labes::CreateService to create labelsDouglas Barbosa Alexandre2016-10-194-9/+10
| | |
| * | Reuse LabelsFinder on Banzai::Filter::LabelReferenceFilterDouglas Barbosa Alexandre2016-10-191-7/+1
| | |
| * | Remove Issuable#add_labels_by_namesDouglas Barbosa Alexandre2016-10-192-26/+18
| | |
| * | List all available labels to the project on the labels APIDouglas Barbosa Alexandre2016-10-191-1/+1
| | |
| * | Add support to group labels on issues board APIDouglas Barbosa Alexandre2016-10-191-2/+2
| | |
| * | Validate label params against all labels available to project on the APIDouglas Barbosa Alexandre2016-10-191-10/+9
| | |
| * | Move label management to services on merge requests APIDouglas Barbosa Alexandre2016-10-191-11/+4
| | |
| * | Keep cross project reference logic in GroupLabel#to_referenceDouglas Barbosa Alexandre2016-10-191-9/+1
| | |