Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-07-11Resolve "Rename the `Master` role to `Maintainer`" BackendMark Chao
2018-05-14Clarify scope for AtomicInternalId shared specShinya Maeda
2018-04-19Shows new branch/mr button even when branch existsJacopo
2018-03-16Add shared specs for AtomicInternalId concern.Andreas Brandl
2018-02-22Port `read_cross_project` ability from EEBob Van Landuyt
2018-01-08Remove soft removals related codeYorick Peterse
This removes all usage of soft removals except for the "pending delete" system implemented for projects. This in turn simplifies all the query plans of the models that used soft removals. Since we don't really use soft removals for anything useful there's no point in keeping it around. This _does_ mean that hard removals of issues (which only admins can do if I'm not mistaken) can influence the "iid" values, but that code is broken to begin with. More on this (and how to fix it) can be found in https://gitlab.com/gitlab-org/gitlab-ce/issues/31114. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/37447
2018-01-02Cache merged and closed events data in merge_request_metrics tableOswaldo Ferreira
2017-12-22Replace '.team << [user, role]' with 'add_role(user)' in specsblackst0ne
2017-12-06Throttle the number of UPDATEs triggered by touchYorick Peterse
This throttles the number of UPDATE queries that can be triggered by calling "touch" on a Note, Issue, or MergeRequest. For Note objects we also take care of updating the associated "noteable" relation in a smarter way than Rails does by default.
2017-11-11Move update_project_counter_caches? out of issue and merge requestGeorge Andrinopoulos
2017-10-09Introduce new hook data builders for Issue and MergeRequestRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-10-09Start adding Gitlab::HookData::IssuableBuilderRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-30Only update the sidebar count caches when neededYorick Peterse
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.
2017-08-23Cache the number of open issues and merge requestsYorick Peterse
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
2017-08-11Enable Timecop safe modeRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-09Enable the Layout/SpaceBeforeBlockBraces copRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-08Merge branch '32844-issuables-performance' into 'master'Sean McGivern
Issuables: Move some code from create services to Sidekiq workers See merge request !13326
2017-08-07Move some after_create parts to worker to improve performanceJarka Kadlecova
2017-08-03Change all `:empty_project` to `:project`Robert Speicher
2017-08-01Ensure all project factories use `:repository` trait or `:empty_project`Robert Speicher
2017-07-27Remove superfluous lib: true, type: redis, service: true, models: true, ↵Rémy Coutable
services: true, no_db: true, api: true Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-06-21Enable Style/DotPosition Rubocop :cop:Grzegorz Bizon
2017-06-14Correct RSpec/SingleLineHook cop offensesRobert Speicher
2017-05-12Move update_assignee_cache_counts to the serviceValery Sizov
2017-05-04Backport of multiple_assignees_feature [ci skip]Valery Sizov
2017-05-04Allow to create new branch and empty WIP merge request from issue pageAlfredo Sumaran
2017-04-20Remove helpers assigned_issuables_count and cached_assigned_issuables_countValery Sizov
2017-04-11Remove an unused `Issue.open_for` scopeRobert Speicher
2017-04-04Do not set closed_at to nil when issue is reopenedFelipe Artur
2017-03-21Spam check only when spammable attributes have changedOswaldo Ferreira
2017-03-17Add closed_at field to issuesFelipe Artur
2017-03-15Merge branch '27271-missing-time-spent-in-issue-webhook' into 'master' Douwe Maan
Include time tracking attributes in webhooks payload Closes #27271 See merge request !9942
2017-03-14Include time tracking attributes in webhooks payloadRuben Davila
2017-03-14Preserve order by priority on issues boardValery Sizov
2017-01-28Present group and dashboard MR list without grouping by projectOswaldo Ferreira
2017-01-28Refactor Project#to_reference and make full_path a keyword argumentBerna Castro
Refactor overall code and fix failing specs Fix Project#to_reference Fix wrong spaces and update changelog Refactor #to_reference for Project & Issue Fix and improves Project#to_reference
2017-01-28Fix and add specs for Issue#to_referenceBerna Castro
2017-01-27Use `:empty_project` where possible in model specsRobert Speicher
2017-01-25Use a project factory with a repository where necessaryRobert Speicher
2017-01-03Fix cross-project references copy to include the project referenceJames Lopez
Also added relevant specs and refactored to_references in a bunch of places to be more consistent.
2016-12-15Merge branch 'jej-24637-move-issue-visible_to_user-to-finder' into 'security' Sean McGivern
Issue#visible_to_user moved to IssuesFinder Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/24637. See merge request !2039
2016-12-03Add shorthand support to gitlab markdown referencesOswaldo Ferreira
2016-11-23Drop Project#authorized_for_user? in favor of ProjectTeam#member?Ahmad Sherif
Closes #23938
2016-11-09Merge branch 'issue_23548_dev' into 'master'Douwe Maan
disable markdown in comments when referencing disabled features fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23548 This MR prevents the following references when tool is disabled: - issues - snippets - commits - when repo is disabled - commit range - when repo is disabled - milestones This MR does not prevent references to repository files, since they are just markdown links and don't leak information. See merge request !2011 Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-10-20Use MergeRequestsClosingIssues cache data on Issue#closed_by_merge_requests ↵Paco Guzman
method
2016-09-28Allow Member.add_user to handle access requestersRémy Coutable
Changes include: - Ensure Member.add_user is not called directly when not necessary - New GroupMember.add_users_to_group to have the same abstraction level as for Project - Refactor Member.add_user to take a source instead of an array of members - Fix Rubocop offenses - Always use Project#add_user instead of project.team.add_user - Factorize users addition as members in Member.add_users_to_source - Make access_level a keyword argument in GroupMember.add_users_to_group and ProjectMember.add_users_to_projects - Destroy any requester before adding them as a member - Improve the way we handle access requesters in Member.add_user Instead of removing the requester and creating a new member, we now simply accepts their access request. This way, they will receive a "access request granted" email. - Fix error that was previously silently ignored - Stop raising when access level is invalid in Member, let Rails validation do their work Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-07-29Method for returning issues readable by a userYorick Peterse
The method Ability.issues_readable_by_user takes a list of users and an optional user and returns an Array of issues readable by said user. This method in turn is used by Banzai::ReferenceParser::IssueParser#nodes_visible_to_user so this method no longer needs to get all the available abilities just to check if a user has the "read_issue" ability. To test this I benchmarked an issue with 222 comments on my development environment. Using these changes the time spent in nodes_visible_to_user was reduced from around 120 ms to around 40 ms.
2016-07-20Refactor user authorization check for a single project to avoid querying all ↵Alejandro Rodríguez
user projects Currently, even when searching for all authorized issues of *one* project, we run the `Users#authorized_projects` query (which can be rather slow). This update checks if we are handling issues of just one project and does the authorization check locally. It does have the downside of basically repeating the logic of `Users#authorized_projects` on `Project#authorized_for_user`.
2016-06-02Update specs. Add CHANGELOG entryJosh Frye
2016-06-01Refactor ParticipableYorick Peterse
There are several changes to this module: 1. The use of an explicit stack in Participable#participants 2. Proc behaviour has been changed 3. Batch permissions checking == Explicit Stack Participable#participants no longer uses recursion to process "self" and all child objects, instead it uses an Array and processes objects in breadth-first order. This allows us to for example create a single Gitlab::ReferenceExtractor instance and pass this to any Procs. Re-using a ReferenceExtractor removes the need for running potentially many SQL queries every time a Proc is called on a new object. == Proc Behaviour Changed Previously a Proc in Participable was expected to return an Array of User instances. This has been changed and instead it's now expected that a Proc modifies the Gitlab::ReferenceExtractor passed to it. The return value of the Proc is ignored. == Permissions Checking The method Participable#participants uses Ability.users_that_can_read_project to check if the returned users have access to the project of "self" _without_ running multiple SQL queries for every user.