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