Commit 65b889b3 authored by Sean McGivern's avatar Sean McGivern

Add feature categories to ProjectsController::[M-P]*

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 dd77a894
...@@ -10,6 +10,8 @@ class Projects::MattermostsController < Projects::ApplicationController ...@@ -10,6 +10,8 @@ class Projects::MattermostsController < Projects::ApplicationController
before_action :service before_action :service
before_action :teams, only: [:new] before_action :teams, only: [:new]
feature_category :integrations
def new def new
end end
......
...@@ -5,6 +5,8 @@ class Projects::MergeRequests::ApplicationController < Projects::ApplicationCont ...@@ -5,6 +5,8 @@ class Projects::MergeRequests::ApplicationController < Projects::ApplicationCont
before_action :merge_request before_action :merge_request
before_action :authorize_read_merge_request! before_action :authorize_read_merge_request!
feature_category :code_review
private private
def merge_request def merge_request
......
...@@ -6,6 +6,8 @@ module Projects ...@@ -6,6 +6,8 @@ module Projects
class BuilderController < Projects::ApplicationController class BuilderController < Projects::ApplicationController
before_action :authorize_metrics_dashboard! before_action :authorize_metrics_dashboard!
feature_category :metrics
def panel_preview def panel_preview
respond_to do |format| respond_to do |format|
format.json do format.json do
......
...@@ -14,6 +14,8 @@ module Projects ...@@ -14,6 +14,8 @@ module Projects
push_frontend_feature_flag(:disable_metric_dashboard_refresh_rate) push_frontend_feature_flag(:disable_metric_dashboard_refresh_rate)
end end
feature_category :metrics
def show def show
if environment if environment
render 'projects/environments/metrics' render 'projects/environments/metrics'
......
...@@ -21,6 +21,8 @@ class Projects::MilestonesController < Projects::ApplicationController ...@@ -21,6 +21,8 @@ class Projects::MilestonesController < Projects::ApplicationController
respond_to :html respond_to :html
feature_category :issue_tracking
def index def index
@sort = params[:sort] || 'due_date_asc' @sort = params[:sort] || 'due_date_asc'
@milestones = milestones.sort_by_attribute(@sort) @milestones = milestones.sort_by_attribute(@sort)
......
...@@ -10,6 +10,8 @@ class Projects::MirrorsController < Projects::ApplicationController ...@@ -10,6 +10,8 @@ class Projects::MirrorsController < Projects::ApplicationController
layout "project_settings" layout "project_settings"
feature_category :source_code_management
def show def show
redirect_to_repository_settings(project, anchor: 'js-push-remote-settings') redirect_to_repository_settings(project, anchor: 'js-push-remote-settings')
end end
......
...@@ -11,6 +11,8 @@ class Projects::NetworkController < Projects::ApplicationController ...@@ -11,6 +11,8 @@ class Projects::NetworkController < Projects::ApplicationController
before_action :assign_options before_action :assign_options
before_action :assign_commit before_action :assign_commit
feature_category :source_code_management
def show def show
@url = project_network_path(@project, @ref, @options.merge(format: :json)) @url = project_network_path(@project, @ref, @options.merge(format: :json))
@commit_url = project_commit_path(@project, 'ae45ca32').gsub("ae45ca32", "%s") @commit_url = project_commit_path(@project, 'ae45ca32').gsub("ae45ca32", "%s")
......
...@@ -11,6 +11,8 @@ class Projects::NotesController < Projects::ApplicationController ...@@ -11,6 +11,8 @@ class Projects::NotesController < Projects::ApplicationController
before_action :authorize_create_note!, only: [:create] before_action :authorize_create_note!, only: [:create]
before_action :authorize_resolve_note!, only: [:resolve, :unresolve] before_action :authorize_resolve_note!, only: [:resolve, :unresolve]
feature_category :issue_tracking
def delete_attachment def delete_attachment
note.remove_attachment! note.remove_attachment!
note.update_attribute(:attachment, nil) note.update_attribute(:attachment, nil)
......
...@@ -6,6 +6,8 @@ module Projects ...@@ -6,6 +6,8 @@ module Projects
include PackagesAccess include PackagesAccess
include SendFileUpload include SendFileUpload
feature_category :package_registry
def download def download
package_file = project.package_files.find(params[:id]) package_file = project.package_files.find(params[:id])
......
...@@ -5,6 +5,8 @@ module Projects ...@@ -5,6 +5,8 @@ module Projects
class PackagesController < Projects::ApplicationController class PackagesController < Projects::ApplicationController
include PackagesAccess include PackagesAccess
feature_category :package_registry
def show def show
@package = project.packages.find(params[:id]) @package = project.packages.find(params[:id])
@package_files = @package.package_files.recent @package_files = @package.package_files.recent
......
...@@ -8,6 +8,8 @@ class Projects::PagesController < Projects::ApplicationController ...@@ -8,6 +8,8 @@ class Projects::PagesController < Projects::ApplicationController
before_action :authorize_update_pages!, except: [:show, :destroy] before_action :authorize_update_pages!, except: [:show, :destroy]
before_action :authorize_remove_pages!, only: [:destroy] before_action :authorize_remove_pages!, only: [:destroy]
feature_category :pages
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
def show def show
@domains = @project.pages_domains.order(:domain).present(current_user: current_user) @domains = @project.pages_domains.order(:domain).present(current_user: current_user)
......
...@@ -9,6 +9,8 @@ class Projects::PagesDomainsController < Projects::ApplicationController ...@@ -9,6 +9,8 @@ class Projects::PagesDomainsController < Projects::ApplicationController
helper_method :domain_presenter helper_method :domain_presenter
feature_category :pages
def show def show
end end
......
...@@ -12,6 +12,8 @@ module Projects ...@@ -12,6 +12,8 @@ module Projects
respond_error(http_status: :bad_request, message: _('Request parameter %{param} is missing.') % { param: exception.param }) respond_error(http_status: :bad_request, message: _('Request parameter %{param} is missing.') % { param: exception.param })
end end
feature_category :metrics
def create def create
result = ::Metrics::Dashboard::CloneDashboardService.new(project, current_user, dashboard_params).execute result = ::Metrics::Dashboard::CloneDashboardService.new(project, current_user, dashboard_params).execute
......
...@@ -10,6 +10,8 @@ class Projects::PipelineSchedulesController < Projects::ApplicationController ...@@ -10,6 +10,8 @@ class Projects::PipelineSchedulesController < Projects::ApplicationController
before_action :authorize_update_pipeline_schedule!, except: [:index, :new, :create, :play] before_action :authorize_update_pipeline_schedule!, except: [:index, :new, :create, :play]
before_action :authorize_admin_pipeline_schedule!, only: [:destroy] before_action :authorize_admin_pipeline_schedule!, only: [:destroy]
feature_category :continuous_integration
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
def index def index
@scope = params[:scope] @scope = params[:scope]
......
...@@ -10,6 +10,8 @@ module Projects ...@@ -10,6 +10,8 @@ module Projects
before_action :pipeline before_action :pipeline
before_action :authorize_read_pipeline! before_action :authorize_read_pipeline!
feature_category :continuous_integration
private private
def pipeline def pipeline
......
...@@ -31,6 +31,8 @@ class Projects::PipelinesController < Projects::ApplicationController ...@@ -31,6 +31,8 @@ class Projects::PipelinesController < Projects::ApplicationController
POLLING_INTERVAL = 10_000 POLLING_INTERVAL = 10_000
feature_category :continuous_integration
def index def index
@pipelines = Ci::PipelinesFinder @pipelines = Ci::PipelinesFinder
.new(project, current_user, index_params) .new(project, current_user, index_params)
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
class Projects::PipelinesSettingsController < Projects::ApplicationController class Projects::PipelinesSettingsController < Projects::ApplicationController
before_action :authorize_admin_pipeline! before_action :authorize_admin_pipeline!
feature_category :continuous_integration
def show def show
redirect_to project_settings_ci_cd_path(@project, params: params.to_unsafe_h) redirect_to project_settings_ci_cd_path(@project, params: params.to_unsafe_h)
end end
......
...@@ -5,6 +5,8 @@ class Projects::ProductAnalyticsController < Projects::ApplicationController ...@@ -5,6 +5,8 @@ class Projects::ProductAnalyticsController < Projects::ApplicationController
before_action :authorize_read_product_analytics! before_action :authorize_read_product_analytics!
before_action :tracker_variables, only: [:setup, :test] before_action :tracker_variables, only: [:setup, :test]
feature_category :product_analytics
def index def index
@events = product_analytics_events.order_by_time.page(params[:page]) @events = product_analytics_events.order_by_time.page(params[:page])
end end
......
...@@ -8,6 +8,8 @@ class Projects::ProjectMembersController < Projects::ApplicationController ...@@ -8,6 +8,8 @@ class Projects::ProjectMembersController < Projects::ApplicationController
# Authorize # Authorize
before_action :authorize_admin_project_member!, except: [:index, :leave, :request_access] before_action :authorize_admin_project_member!, except: [:index, :leave, :request_access]
feature_category :authentication_and_authorization
def index def index
@sort = params[:sort].presence || sort_value_name @sort = params[:sort].presence || sort_value_name
......
...@@ -16,6 +16,8 @@ module Projects ...@@ -16,6 +16,8 @@ module Projects
before_action :authorize_read_prometheus_alerts!, except: [:notify] before_action :authorize_read_prometheus_alerts!, except: [:notify]
before_action :alert, only: [:update, :show, :destroy, :metrics_dashboard] before_action :alert, only: [:update, :show, :destroy, :metrics_dashboard]
feature_category :alert_management
def index def index
render json: serialize_as_json(alerts) render json: serialize_as_json(alerts)
end end
......
...@@ -6,6 +6,8 @@ module Projects ...@@ -6,6 +6,8 @@ module Projects
before_action :authorize_admin_project! before_action :authorize_admin_project!
before_action :require_prometheus_metrics! before_action :require_prometheus_metrics!
feature_category :metrics
def active_common def active_common
respond_to do |format| respond_to do |format|
format.json do format.json do
......
...@@ -10,6 +10,8 @@ class Projects::ProtectedRefsController < Projects::ApplicationController ...@@ -10,6 +10,8 @@ class Projects::ProtectedRefsController < Projects::ApplicationController
layout "project_settings" layout "project_settings"
feature_category :source_code_management
def index def index
redirect_to_repository_settings(@project) redirect_to_repository_settings(@project)
end end
......
...@@ -4,6 +4,8 @@ module Projects ...@@ -4,6 +4,8 @@ module Projects
class OnDemandScansController < Projects::ApplicationController class OnDemandScansController < Projects::ApplicationController
before_action :authorize_read_on_demand_scans! before_action :authorize_read_on_demand_scans!
feature_category :dynamic_application_security_testing
def index def index
end end
end end
......
...@@ -13,6 +13,8 @@ class Projects::PathLocksController < Projects::ApplicationController ...@@ -13,6 +13,8 @@ class Projects::PathLocksController < Projects::ApplicationController
before_action :assign_ref_vars, only: :toggle before_action :assign_ref_vars, only: :toggle
before_action :lfs_blob_ids, only: :toggle before_action :lfs_blob_ids, only: :toggle
feature_category :source_code_management
def index def index
@path_locks = @project.path_locks.page(params[:page]) @path_locks = @project.path_locks.page(params[:page])
end end
......
...@@ -3,6 +3,8 @@ class Projects::ProtectedEnvironmentsController < Projects::ApplicationControlle ...@@ -3,6 +3,8 @@ class Projects::ProtectedEnvironmentsController < Projects::ApplicationControlle
before_action :authorize_admin_project! before_action :authorize_admin_project!
before_action :protected_environment, except: [:create, :search] before_action :protected_environment, except: [:create, :search]
feature_category :continuous_delivery
def create def create
protected_environment = ::ProtectedEnvironments::CreateService.new(@project, current_user, protected_environment_params).execute protected_environment = ::ProtectedEnvironments::CreateService.new(@project, current_user, protected_environment_params).execute
......
...@@ -11,6 +11,8 @@ class Projects::PushRulesController < Projects::ApplicationController ...@@ -11,6 +11,8 @@ class Projects::PushRulesController < Projects::ApplicationController
layout "project_settings" layout "project_settings"
feature_category :source_code_management
def update def update
@push_rule = project.push_rule @push_rule = project.push_rule
@push_rule.update(push_rule_params) @push_rule.update(push_rule_params)
......
...@@ -30,7 +30,8 @@ RSpec.describe "Every controller" do ...@@ -30,7 +30,8 @@ RSpec.describe "Every controller" do
next if controller.to_s.start_with?('P') && 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', 'E', 'F', 'G', 'H',
'I', 'J', 'K', 'L') 'I', 'J', 'K', 'L',
'M', 'N', 'O', 'P')
"#{controller}##{action}" "#{controller}##{action}"
end.compact 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