Commit fbb0b9ba authored by Sean McGivern's avatar Sean McGivern

Add feature categories to controllers beginning with A

parent 0ba7c367
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
class AbuseReportsController < ApplicationController class AbuseReportsController < ApplicationController
before_action :set_user, only: [:new] before_action :set_user, only: [:new]
feature_category :users
def new def new
@abuse_report = AbuseReport.new @abuse_report = AbuseReport.new
@abuse_report.user_id = @user.id @abuse_report.user_id = @user.id
......
...@@ -3,6 +3,12 @@ ...@@ -3,6 +3,12 @@
class AutocompleteController < ApplicationController class AutocompleteController < ApplicationController
skip_before_action :authenticate_user!, only: [:users, :award_emojis, :merge_request_target_branches] skip_before_action :authenticate_user!, only: [:users, :award_emojis, :merge_request_target_branches]
feature_category :users, [:users, :user]
feature_category :projects, [:projects]
feature_category :issue_tracking, [:award_emojis]
feature_category :code_review, [:merge_request_target_branches]
feature_category :continuous_delivery, [:deploy_keys_with_owners]
def users def users
group = Autocomplete::GroupFinder group = Autocomplete::GroupFinder
.new(current_user, project, params) .new(current_user, project, params)
......
...@@ -2,6 +2,13 @@ ...@@ -2,6 +2,13 @@
module EE module EE
module AutocompleteController module AutocompleteController
extend ::ActiveSupport::Concern
prepended do
feature_category :subgroups, [:project_groups, :namespace_routes]
feature_category :projects, [:project_routes]
end
def project_groups def project_groups
groups = ::Autocomplete::ProjectInvitedGroupsFinder groups = ::Autocomplete::ProjectInvitedGroupsFinder
.new(current_user, params) .new(current_user, params)
......
...@@ -18,7 +18,7 @@ RSpec.describe "Every controller" do ...@@ -18,7 +18,7 @@ RSpec.describe "Every controller" do
.select { |route| route[:controller].present? && route[:action].present? } .select { |route| route[:controller].present? && route[:action].present? }
.map { |route| [constantize_controller(route[:controller]), route[:action]] } .map { |route| [constantize_controller(route[:controller]), route[:action]] }
.select { |(controller, action)| controller&.include?(ControllerWithFeatureCategory) } .select { |(controller, action)| controller&.include?(ControllerWithFeatureCategory) }
.reject { |(controller, action)| controller == Devise::UnlocksController } .reject { |(controller, action)| controller == ApplicationController || controller == Devise::UnlocksController }
end end
let_it_be(:routes_without_category) do let_it_be(:routes_without_category) do
...@@ -29,7 +29,7 @@ RSpec.describe "Every controller" do ...@@ -29,7 +29,7 @@ RSpec.describe "Every controller" do
'H', 'I', 'J', 'K', 'L', 'H', 'I', 'J', 'K', 'L',
'M', 'N', 'O', 'Q', 'R', 'M', 'N', 'O', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'S', 'T', 'U', 'V', 'W',
'X', 'Y', 'Z', 'X', 'Y', 'Z', 'A',
'Projects::MergeRequestsController') 'Projects::MergeRequestsController')
"#{controller}##{action}" "#{controller}##{action}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment