summaryrefslogtreecommitdiff
path: root/app/models
Commit message (Collapse)AuthorAgeFilesLines
* Only update the sidebar count caches when neededsidebar-cache-updatesYorick Peterse2017-08-302-0/+12
| | | | | | This ensures the issues/MR cache of the sidebar is only updated when the state or confidential flags changes, instead of changing this for every update.
* Rename MergeRequest#async_merge to merge_asyncOswaldo Ferreira2017-08-281-1/+1
|
* Add changelogOswaldo Ferreira2017-08-281-1/+1
|
* Track enqueued and ongoing MRsOswaldo Ferreira2017-08-281-3/+9
|
* Remove locked? check when unlocking a merge requestOswaldo Ferreira2017-08-281-1/+1
| | | | | Our state machine shall have enough knowledge to not allow states other than locked from transitioning to opened (e.g. MergeRequest#unlock_mr).
* Merge branch '36792-inline-user-refresh-when-creating-project' into 'master'Douwe Maan2017-08-281-2/+2
|\ | | | | | | | | | | | | Don't wait for project authorization sidekiq jobs when creating projects Closes #36792 See merge request !13775
| * Move sidekiq-based project authorization refresh out of Projects::CreateServiceNick Thomas2017-08-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | If the project is in a group, the `group.refresh_members_authorized_projects` is made non-blocking, and we call `current_user.refresh_authorized_projects` directly. Projects in a personal namespace are more difficult. Rather than passing the `blocking:` parameter through the entire `add_master` chain, have the `AuthorizedProjectsWorker` automatically inline authorizations for three IDs or less. Since the maximum number of IDs in this path is 2, that has the same effect.
* | Merge branch 'bugfix.notify-custom-participants' into 'master'Sean McGivern2017-08-281-27/+26
|\ \ | | | | | | | | | | | | | | | | | | Bugfix.notify custom participants Closes #36610 See merge request !13680
| * | don't rely on order of notification levelshttp://jneen.net/2017-08-211-27/+26
| | | | | | | | | | | | | | | | | | | | | factor out #suitable_notification_level? and check manually by notification level. this makes the notification logic clear and actually reflect what is in the documentation as to what should happen with each setting.
* | | Remove 'dependent: :destroy' from ProtectedRef has_many :"#{type}_access_levels"jej/remove-dependent-destroy-from-protected-refsJames Edwards-Jones2017-08-251-1/+1
| | |
* | | Merge branch 'fix/gb/fix-invalid-stage-status-transition' into 'master'Kamil Trzciński2017-08-251-0/+4
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | Set a default CI/CD status when it is not known Closes #36790 See merge request !13737
| * | Set a default CI/CD status when it is not knownfix/gb/fix-invalid-stage-status-transitionGrzegorz Bizon2017-08-221-0/+4
| | |
* | | Merge branch 'git-operation-user' into 'master'Sean McGivern2017-08-241-1/+1
|\ \ \ | | | | | | | | | | | | | | | | Move GitHooksService into Gitlab::Git See merge request !13739
| * | | Avoid committer = linesgit-operation-userJacob Vosmaer2017-08-241-18/+9
| | | |
| * | | Make gl_repository a G::G::Repository attributeJacob Vosmaer2017-08-231-1/+1
| | | |
| * | | Decouple GitOperationService from UserJacob Vosmaer2017-08-231-9/+18
| | | |
* | | | Merge branch 'backstage/gb/after-save-asynchronous-job-hooks' into 'master'Kamil Trzciński2017-08-241-1/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not fire synchronous hooks when creating a job Closes #35286 See merge request !13734
| * \ \ \ Merge branch 'master' into backstage/gb/after-save-asynchronous-job-hooksGrzegorz Bizon2017-08-2312-109/+278
| |\ \ \ \ | | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (115 commits) Use event-based waiting in Gitlab::JobWaiter Make sure repository's removal work for legacy and hashed storages Use `@hashed` prefix for hashed paths on disk, to avoid collision with existing ones Refactor project and storage types Prevent using gitlab import task when hashed storage is enabled Some codestyle changes and fixes for GitLab pages Removed some useless code, codestyle changes and removed an index Fix repository reloading in some specs Changelog Moving away from the "extend" based factory to a more traditional one. Enable automatic hashed storage for new projects by application settings New storage is now "Hashed" instead of "UUID" Add UUID Storage to Project Move create_repository back to project model as we can use disk_path and share it Codestyle: move hooks to the same place and move dependent methods to private Use non-i18n values for setting new group-level issue/MR button text indexes external issue tracker copyedit indexes user/search/ from /user/index Correctly encode string params for Gitaly's TreeEntries RPC ...
| * | | | Run job hooks after transation commits after createGrzegorz Bizon2017-08-231-1/+1
| | | | |
| * | | | Do not fire synrchonous hooks when creating a jobGrzegorz Bizon2017-08-221-1/+4
| | | | | | | | | | | | | | | | | | | | Fire asynchronous hooks instead.
* | | | | Merge branch 'archived-projects-only' into 'master'Douwe Maan2017-08-241-0/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an option to list only archived projects Closes #35994 See merge request !13492
| * | | | | Add an option to list only archived projectsMehdi Lahmam2017-08-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Closes #35994
* | | | | | Delegate Repository::branch_exists? and ref_exists? to Gitlab::GitAndrew Newdigate2017-08-241-3/+10
| | | | | |
* | | | | | Merge branch '36262_merge_request_reference_in_merge_commit_global' into ↵Sean McGivern2017-08-241-2/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'master' fix Merge request reference in merge commit is not global Closes #36262 See merge request !13518
| * | | | | | [ci skip] changelog entry added for full merge request ref changeshaseeb2017-08-231-1/+0
| | | | | | |
| * | | | | | fix Merge request reference in merge commit is not globalhaseeb2017-08-131-2/+2
| | | | | | |
* | | | | | | Merge branch 'zj-add-pipeline-source-variable' into 'master'Grzegorz Bizon2017-08-241-1/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expose CI_PIPELINE_SOURCE on CI jobs Closes #34165 See merge request !13759
| * | | | | | | Expose CI_PIPELINE_SOURCE on CI jobsZeger-Jan van de Weg2017-08-231-1/+2
| | |_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | It was missing and expected it wouldn't hurt anyone
* | | | | | | Merge branch 'use_full_path_in_project_avatar_url_webhook' into 'master'Robert Speicher2017-08-231-1/+1
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use full path of project's avatar in webhooks Closes #36539 See merge request !13649
| * | | | | | Use full path of project's avatar in webhooksblackst0ne2017-08-181-1/+1
| | | | | | |
* | | | | | | Merge branch 'cache-issue-and-mr-counts' into 'master'Douwe Maan2017-08-233-1/+17
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cache the number of open issues and merge requests Closes #36622 See merge request !13639
| * | | | | | | Cache the number of open issues and merge requestsYorick Peterse2017-08-233-1/+17
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every project page displays a navigation menu that in turn displays the number of open issues and merge requests. This means that for every project page we run two COUNT(*) queries, each taking up roughly 30 milliseconds on GitLab.com. By caching these numbers and refreshing them whenever necessary we can reduce loading times of all these pages by up to roughly 60 milliseconds. The number of open issues does not include confidential issues. This is a trade-off to keep the code simple and to ensure refreshing the data only needs 2 COUNT(*) queries instead of 3. A downside is that if a project only has 5 confidential issues the counter will be set to 0. Because we now have 3 similar counting service classes the code previously used in Projects::ForksCountService has mostly been moved to Projects::CountService, which in turn is reused by the various service classes. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36622
* | | | | | | Merge branch 'fix-push-events-branch-removals' into 'master'Sean McGivern2017-08-231-1/+1
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix displaying events of removed events and events without commit messages Closes #36685 and #36722 See merge request !13721
| * | | | | | Fix display of push events for removed refsfix-push-events-branch-removalsYorick Peterse2017-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the style of push events that remove tags or branches so they don't display the commit details. This prevents displaying commit details such as: 000000 . --broken encoding Instead we now simply display the header such as: Administrator deleted branch example-branch This is displayed in the same style as events for newly created branches/tags. This commit also ensures that if no commit message is present we simply don't display anything, instead of "--broken encoding". Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36685 Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36722
* | | | | | | Merge branch 'fix/sm/34762-bad-validation-message' into 'master'Kamil Trzciński2017-08-221-0/+6
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enforce namespace of Kubernetes to lowercase Closes #34762 See merge request !13732
| * | | | | | Enfouce namespace for Kubernetes to lowercaseShinya Maeda2017-08-221-0/+6
| | |_|_|_|/ | |/| | | |
* | | | | | Merge branch 'fix-broadcast-message-caching' into 'master'Sean McGivern2017-08-221-5/+27
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix caching of future broadcast messages Closes #36661 See merge request !13667
| * | | | | Fix caching of future broadcast messagesfix-broadcast-message-cachingYorick Peterse2017-08-211-5/+27
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the caching mechanism so we cache both current _and_ future broadcast messages, then manually filter out those we don't want to display. This ensures we don't need any additional queries while still being able to display the right messages at the right time. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36661
* | | | | Make sure repository's removal work for legacy and hashed storages28283-uuid-storageGabriel Mazetto2017-08-221-0/+4
| | | | |
* | | | | Use `@hashed` prefix for hashed paths on disk, to avoid collision with ↵Gabriel Mazetto2017-08-221-2/+4
| | | | | | | | | | | | | | | | | | | | existing ones
* | | | | Refactor project and storage typesGabriel Mazetto2017-08-223-80/+62
| | | | |
* | | | | Some codestyle changes and fixes for GitLab pagesGabriel Mazetto2017-08-221-1/+2
| | | | |
* | | | | Removed some useless code, codestyle changes and removed an indexGabriel Mazetto2017-08-222-6/+4
| | | | |
* | | | | Fix repository reloading in some specsGabriel Mazetto2017-08-223-4/+8
| | | | |
* | | | | Moving away from the "extend" based factory to a more traditional one.Gabriel Mazetto2017-08-223-34/+52
| | | | | | | | | | | | | | | | | | | | | | | | | Using `extend` dynamically can lead to bad performance as it invalidates the method's cache.
* | | | | Enable automatic hashed storage for new projects by application settingsGabriel Mazetto2017-08-221-0/+4
| | | | |
* | | | | New storage is now "Hashed" instead of "UUID"Gabriel Mazetto2017-08-223-9/+35
| | | | |
* | | | | Add UUID Storage to ProjectGabriel Mazetto2017-08-222-1/+66
| | | | |
* | | | | Move create_repository back to project model as we can use disk_path and ↵Gabriel Mazetto2017-08-222-13/+13
| | | | | | | | | | | | | | | | | | | | share it
* | | | | Codestyle: move hooks to the same place and move dependent methods to privateGabriel Mazetto2017-08-221-19/+18
|/ / / /