summaryrefslogtreecommitdiff
path: root/app/services/labels
Commit message (Collapse)AuthorAgeFilesLines
* Add a rubocop for Rails.loggerMayra Cabrera2019-07-101-1/+1
| | | | | | Suggests to use a JSON structured log instead Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/54102
* Check if labels are available for target issuableJarka Košanová2019-03-281-0/+60
| | | | | - labels have to be in the same project/group as an issuable
* Incorporate feedback from NickRobert Schilling2019-01-311-0/+1
|
* Enable the Layout/ExtraSpacing cop56392-enable-the-layout-extraspacing-copRémy Coutable2019-01-241-1/+1
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Fix several ActionController::Parameters deprecationsJasper Maes2019-01-112-2/+2
|
* Fix deprecation: Passing ActiveRecord::Base objects to ↵Jasper Maes2018-12-131-4/+4
| | | | sanitize_sql_hash_for_assignment
* Replace deprecated uniq on a Relation with distinctJasper Maes2018-10-261-1/+1
|
* Added FromUnion to easily select from a UNIONYorick Peterse2018-09-171-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the module `FromUnion`, which provides the class method `from_union`. This simplifies the process of selecting data from the result of a UNION, and reduces the likelihood of making mistakes. As a result, instead of this: union = Gitlab::SQL::Union.new([foo, bar]) Foo.from("(#{union.to_sql}) #{Foo.table_name}") We can now write this instead: Foo.from_union([foo, bar]) This commit also includes some changes to make this new setup work properly. For example, a bug in Rails 4 (https://github.com/rails/rails/issues/24193) would break the use of `from("sub-query-here").includes(:relation)` in certain cases. There was also a CI query which appeared to repeat a lot of conditions from an outer query on an inner query, which isn't necessary. Finally, we include a RuboCop cop to ensure developers use this new module, instead of using Gitlab::SQL::Union directly. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/51307
* Disable existing offenses for the CodeReuse copsYorick Peterse2018-09-113-0/+28
| | | | | This whitelists all existing offenses for the various CodeReuse cops, of which most are triggered by the CodeReuse/ActiveRecord cop.
* Use ResourceLabelEvent for tracking label changesJan Provaznik2018-09-071-0/+7
|
* Whitelist existing destroy_all offensesblacklist-destroy-allYorick Peterse2018-08-161-1/+1
| | | | This whitelists all existing places where we use "destroy_all".
* Enable frozen string in apps/services/**/*.rbrepo-forks/gitlab-ce-frozen-string-enable-apps-services-innergfyoung2018-07-166-0/+12
| | | | | | For directories application_settings --> labels. Partially addresses #47424.
* Backport from EE !5954Mark Chao2018-07-041-1/+7
| | | | | | Allow Labels::FindOrCreateService to find ancestor group labels Add authentication check on API endpoint Update flayignore
* Fix label links update on project transferJan Provaznik2018-04-191-3/+8
|
* Allow to find labels in ancestor groups and better group support in label ↵Jan Provaznik2018-02-261-6/+16
| | | | service
* Keep subscribers when promoting labels to group labels37199-labels-fixJarka Kadlecová2018-01-121-1/+11
|
* Adds Rubocop rule for line break after guard clauseJacopo2017-11-161-0/+1
| | | | Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
* Re-enable SqlInjection and CommandInjectionBrian Neel2017-08-081-1/+1
|
* Enable Style/DotPosition Rubocop :cop:Grzegorz Bizon2017-06-212-24/+24
|
* Labels support color names in backendDongqing Hu2017-03-294-2/+203
|
* Abillity to promote project labels to group labelsRitave2017-01-311-0/+71
| | | | Fixes #24021
* Merge branch 'zj-fix-label-creation-non-members' into 'security'Douwe Maan2016-11-281-1/+6
| | | | | | | | Fix label creation non members Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23416 See merge request !2006
* Pass user instance to Labels::FindOrCreateService or skip_authorization: trueadam-fix-labels-find-or-createAdam Niedzielski2016-10-281-4/+7
| | | | | | Do not pass project.owner because it may return a group and Labels::FindOrCreateService throws an error in this case. Fixes #23694.
* Avoid touch label links that does not belongs to project when moving itfeature/group-level-labelsDouglas Barbosa Alexandre2016-10-191-15/+42
|
* Rename Labels::CreateService to Labels::FindOrCreateServiceDouglas Barbosa Alexandre2016-10-192-2/+2
|
* User Labes::CreateService to create labelsDouglas Barbosa Alexandre2016-10-191-6/+2
|
* Add service to create project labelsDouglas Barbosa Alexandre2016-10-191-0/+33
|
* Recreates the label priorities when moving project to another groupDouglas Barbosa Alexandre2016-10-191-1/+2
|
* Skip update query if label have the same id on Labels::TransferServiceDouglas Barbosa Alexandre2016-10-191-0/+2
|
* Recreates missing group labels when moving project to another groupDouglas Barbosa Alexandre2016-10-191-0/+52
|
* Refactor global and group milestones logicDmitriy Zaporozhets2015-11-161-26/+0
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Allow dashboard and group issues/MRs to be filtered by labelDouwe Maan2015-10-141-0/+26