Commit c11ebd30 authored by Sean McGivern's avatar Sean McGivern

Add feature categories to ProjectsController::[E-H]*

Danger wants a commit body, but there's really not any more to say.
These are all best effort and not guaranteed to be 100% accurate.
parent c987c5e1
......@@ -5,6 +5,8 @@ class Projects::Environments::PrometheusApiController < Projects::ApplicationCon
before_action :proxyable
feature_category :metrics
private
def proxyable
......
# frozen_string_literal: true
class Projects::Environments::SampleMetricsController < Projects::ApplicationController
feature_category :metrics
def query
result = Metrics::SampleMetricsService.new(params[:identifier], range_start: params[:start], range_end: params[:end]).query
......
......@@ -25,6 +25,8 @@ class Projects::EnvironmentsController < Projects::ApplicationController
before_action :expire_etag_cache, only: [:index], unless: -> { request.format.json? }
after_action :expire_etag_cache, only: [:cancel_auto_stop]
feature_category :continuous_delivery
def index
@environments = project.environments
.with_state(params[:scope] || :available)
......
......@@ -3,6 +3,8 @@
class Projects::ErrorTracking::BaseController < Projects::ApplicationController
POLLING_INTERVAL = 1_000
feature_category :error_tracking
def set_polling_interval
Gitlab::PollingInterval.set_header(response, interval: POLLING_INTERVAL)
end
......
......@@ -7,6 +7,8 @@ module Projects
before_action :authorize_read_sentry_issue!
feature_category :error_tracking
def index
service = ::ErrorTracking::ListProjectsService.new(
project,
......
......@@ -4,6 +4,8 @@ class Projects::FeatureFlagsClientsController < Projects::ApplicationController
before_action :authorize_admin_feature_flags_client!
before_action :feature_flags_client
feature_category :feature_flags
def reset_token
feature_flags_client.reset_token!
......
......@@ -19,6 +19,8 @@ class Projects::FeatureFlagsController < Projects::ApplicationController
push_frontend_feature_flag(:feature_flags_legacy_read_only_override, project)
end
feature_category :feature_flags
def index
@feature_flags = FeatureFlagsFinder
.new(project, current_user, scope: params[:scope])
......
......@@ -4,6 +4,8 @@ class Projects::FeatureFlagsUserListsController < Projects::ApplicationControlle
before_action :authorize_admin_feature_flags_user_lists!
before_action :user_list, only: [:edit, :show]
feature_category :feature_flags
def new
end
......
......@@ -10,6 +10,8 @@ class Projects::FindFileController < Projects::ApplicationController
before_action :assign_ref_vars
before_action :authorize_download_code!
feature_category :source_code_management
def show
return render_404 unless @repository.commit(@ref)
......
......@@ -14,6 +14,8 @@ class Projects::ForksController < Projects::ApplicationController
before_action :authorize_fork_project!, only: [:new, :create]
before_action :authorize_fork_namespace!, only: [:create]
feature_category :source_code_management
def index
@total_forks_count = project.forks.size
@public_forks_count = project.forks.public_only.size
......
......@@ -4,6 +4,8 @@ class Projects::GrafanaApiController < Projects::ApplicationController
include RenderServiceResults
include MetricsDashboard
feature_category :metrics
def proxy
result = ::Grafana::ProxyService.new(
project,
......
......@@ -11,6 +11,8 @@ class Projects::GraphsController < Projects::ApplicationController
track_unique_visits :charts, target_id: 'p_analytics_repo'
feature_category :source_code_management
def show
respond_to do |format|
format.html
......
......@@ -5,6 +5,8 @@ class Projects::GroupLinksController < Projects::ApplicationController
before_action :authorize_admin_project!
before_action :authorize_admin_project_member!, only: [:update]
feature_category :subgroups
def create
group = Group.find(params[:link_group_id]) if params[:link_group_id].present?
......
......@@ -12,6 +12,8 @@ class Projects::HookLogsController < Projects::ApplicationController
layout 'project_settings'
feature_category :integrations
def show
end
......
......@@ -12,6 +12,8 @@ class Projects::HooksController < Projects::ApplicationController
layout "project_settings"
feature_category :integrations
def index
@hooks = @project.hooks
@hook = ProjectHook.new
......
......@@ -6,6 +6,8 @@ module Projects
before_action :authorize_admin_feature_flags_issue_links!
feature_category :feature_flags
private
def create_service
......
......@@ -28,7 +28,8 @@ RSpec.describe "Every controller" do
next if controller.feature_category_for_action(action)
next if controller.to_s.start_with?('P') &&
!child_controller.to_s.start_with?('A', 'B', 'C', 'D')
!child_controller.to_s.start_with?('A', 'B', 'C', 'D',
'E', 'F', 'G', 'H')
"#{controller}##{action}"
end.compact
......
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