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-09-11Disable existing offenses for the CodeReuse copsYorick Peterse
This whitelists all existing offenses for the various CodeReuse cops, of which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11Rails 5: fix issue move serviceJasper Maes
In rails 5, the attributes method for an enum returns the name instead of the database integer.
2018-09-07Use ResourceLabelEvent for tracking label changesJan Provaznik
2018-09-04Merge branch '39665-restrict-issue-reopen' into 'master'Sean McGivern
Restrict reopening locked issues for non authorized issue authors Closes #39665 See merge request gitlab-org/gitlab-ce!21299
2018-09-04Restrict reopening locked issues for issue authorsJarka Kadlecová
2018-08-21Only load issue notes once when getting related MRsSean McGivern
As we always call both methods from the controller - and elsewhere we call the more general method - and one uses all notes and the other uses system notes, then we should just load the notes and their authors once, and filter on the Ruby side.
2018-08-21Fix CI pipelines N+1 in Issues::ReferencedMergeRequestsServiceSean McGivern
Whether the preloading belongs in the service or the controller is arguable, here. As the service is only used for one controller action, it seems reasonable to put it in the service, but that is not a definitive answer. Adding the preloads for MR project routes here doesn't seem to work, perhaps because of https://github.com/rails/rails/issues/32140.
2018-08-21Fix authors N+1 in Issues::ReferencedMergeRequestsServiceSean McGivern
`#referenced_merge_requests` preloaded too many associations. Award emoji, for instance, are completely unnecessary here. `#closed_by_merge_requests` had the opposite problem: `#all_references` needs each item's author, and these weren't preloaded.
2018-08-21Move Issue#{referenced,closed_by}_merge_requests to serviceSean McGivern
These methods don't really need to be on the Issue model. Issue#related_branches can also be moved to a service, but we can do that in a separate commit. This commit does not change any behaviour; it just moves code around, renames the service, and refactors the specs.
2018-07-30Delete todos when users loses target read permissionsJarka Kadlecová
2018-07-16Enable frozen string in apps/services/**/*.rbgfyoung
For directories application_settings --> labels. Partially addresses #47424.
2018-07-05Make Issues::BaseService match EESean McGivern
We have `#allows_multiple_assignees?` defined in CE too, and `take(1)` appears to be equivalent to `[0, 1]`.
2018-06-27Keep label on issue when movingChantal Rollison
2018-04-25Move NotificationService calls to SidekiqSean McGivern
The NotificationService has to do quite a lot of work to calculate the recipients for an email. Where possible, we should try to avoid doing this in an HTTP request, because the mail are sent by Sidekiq anyway, so there's no need to schedule those emails immediately. This commit creates a generic Sidekiq worker that uses Global ID to serialise and deserialise its arguments, then forwards them to the NotificationService. The NotificationService gains an `#async` method, so you can replace: notification_service.new_issue(issue, current_user) With: notification_service.async.new_issue(issue, current_user) And have everything else work as normal, except that calculating the recipients will be done by Sidekiq, which will then schedule further Sidekiq jobs to send each email.
2018-04-05Improve specs and docsFelipe Artur
2018-04-05Merge branch 'issue_44551' into 'master'Sean McGivern
Fix 404 in group boards when moving issue between lists Closes #44551 See merge request gitlab-org/gitlab-ce!18064
2018-04-03Fix 404 in group boards when moving issue between listsFelipe Artur
2018-03-05changed the way of nullifying columshaseeb
2018-03-03nullify closed by on reopenning issuehaseeb
2018-02-28closed by field addedhaseeb
2018-02-18Remember assignee when moving an issueJan Provaznik
Related to #41949
2018-02-15Re-organize issue move method callsJan Provaznik
Move method calls related to execution of moving an issue into separate private mothods. The reason is that then these methods can be easily extended with EE specific code (https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4550#note_59158691). Related gitlab-ce#41949
2018-02-13Change issue show page to group MRs by projects and namespacesJeff Stubler
Closes #26466.
2018-01-11Fix bug where award emojis would be lost when moving issues between projectsStan Hu
Closes #33423
2017-11-24Refactor the way we pass `old associations` to issuable's update servicesRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-11-15Add total_time_spent to the `changes` hash in issuable Webhook payloadsRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-11-11Move update_project_counter_caches? out of issue and merge requestGeorge Andrinopoulos
2017-11-02CE port of code changed for epicsJarka Kadlecova
2017-10-30Refresh open Issue and Merge Request project counter caches when re-openingRob Ede
2017-10-09Merge branch '34284-add-changes-to-issuable-webhook-data' into 'master'Douwe Maan
Include the changes in issuable webhook payloads Closes #34284 See merge request gitlab-org/gitlab-ce!14308
2017-10-09Don't create todos for old issue assigneesJarka Kadlecova
2017-10-09Start adding Gitlab::HookData::IssuableBuilderRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-10-09Include the changes in issuable webhook payloadsRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-09-19Fix refreshing of issues/MR count cachesYorick Peterse
This ensures the open issues/MR count caches are refreshed properly when creating new issues or MRs. This MR also includes a change to the cache keys to ensure all caches are rebuilt on the fly. This particular problem was not caught in the test suite due to a null cache being used, resulting in all calls that would use a cache using the underlying data directly. In production the code would fail because a newly saved record returns an empty hash in #changes meaning checks such as `state_changed? || confidential_changed?` would return false for new rows, thus never updating the counters. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/38061
2017-09-06Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ↵Simon Knox
ee_issue_928_backport
2017-09-01Merge branch 'move-action' into 'master'Sean McGivern
Merge request to address /move functionality. See merge request !13436
2017-08-31/move project functionality. Squash commit.Manolis Mavrofidis
Update to add all issues to be updated. Added functionality, proper tests, documentation and changelog.
2017-08-31Small fixesFelipe Artur
2017-08-29Group boards CE backportFelipe Artur
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-08Simplify checking if objects exist code in new issaubles workersJarka Kadlecova
2017-08-07Move some after_create parts to worker to improve performanceJarka Kadlecova
2017-07-28Merge issuable "reopened" state into "opened"Yorick Peterse
Having two states that essentially mean the same thing is very much like having a boolean "true" and boolean "mostly-true": it's rather silly. This commit merges the "reopened" state into the "opened" state while taking care of system notes still showing messages along the lines of "Alice reopened this issue". A big benefit from having only two states (opened and closed) is that indexing and querying becomes simpler and more performant. For example, to get all the opened queries we no longer have to query both states: SELECT * FROM issues WHERE project_id = 2 AND state IN ('opened', 'reopened'); Instead we can query a single state directly, which can be much faster: SELECT * FROM issues WHERE project_id = 2 AND state = 'opened'; Further, only having two states makes indexing easier as we will only ever filter (and thus scan an index) using a single value. Partial indexes could help but aren't supported on MySQL, complicating the development process and not being helpful for MySQL.
2017-07-25Merge branch 'archytaus/gitlab-ce-26372-duplicate-issue-slash-command' into ↵Rémy Coutable
'master' New `/duplicate` quick action Closes #26372 See merge request !12845
2017-07-24Support both internal and external issue trackersJarka Kadlecova
2017-07-21Move duplicate issue management to a serviceSean McGivern
2017-07-19Clear issuable counter caches on updateSean McGivern
When an issuable's state changes, or one is created, we should clear the cache counts for a user's assigned issuables, and also the project-wide caches for this user type.
2017-07-07Native group milestonesFelipe Artur
2017-06-21Enable Style/DotPosition Rubocop :cop:Grzegorz Bizon
2017-05-26Fix counters cache invalidation for Issues and Merge RequestsValery Sizov