Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
fbb0b9ba
Commit
fbb0b9ba
authored
Oct 05, 2020
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature categories to controllers beginning with A
parent
0ba7c367
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
2 deletions
+17
-2
app/controllers/abuse_reports_controller.rb
app/controllers/abuse_reports_controller.rb
+2
-0
app/controllers/autocomplete_controller.rb
app/controllers/autocomplete_controller.rb
+6
-0
ee/app/controllers/ee/autocomplete_controller.rb
ee/app/controllers/ee/autocomplete_controller.rb
+7
-0
spec/controllers/every_controller_spec.rb
spec/controllers/every_controller_spec.rb
+2
-2
No files found.
app/controllers/abuse_reports_controller.rb
View file @
fbb0b9ba
...
...
@@ -3,6 +3,8 @@
class
AbuseReportsController
<
ApplicationController
before_action
:set_user
,
only:
[
:new
]
feature_category
:users
def
new
@abuse_report
=
AbuseReport
.
new
@abuse_report
.
user_id
=
@user
.
id
...
...
app/controllers/autocomplete_controller.rb
View file @
fbb0b9ba
...
...
@@ -3,6 +3,12 @@
class
AutocompleteController
<
ApplicationController
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
group
=
Autocomplete
::
GroupFinder
.
new
(
current_user
,
project
,
params
)
...
...
ee/app/controllers/ee/autocomplete_controller.rb
View file @
fbb0b9ba
...
...
@@ -2,6 +2,13 @@
module
EE
module
AutocompleteController
extend
::
ActiveSupport
::
Concern
prepended
do
feature_category
:subgroups
,
[
:project_groups
,
:namespace_routes
]
feature_category
:projects
,
[
:project_routes
]
end
def
project_groups
groups
=
::
Autocomplete
::
ProjectInvitedGroupsFinder
.
new
(
current_user
,
params
)
...
...
spec/controllers/every_controller_spec.rb
View file @
fbb0b9ba
...
...
@@ -18,7 +18,7 @@ RSpec.describe "Every controller" do
.
select
{
|
route
|
route
[
:controller
].
present?
&&
route
[
:action
].
present?
}
.
map
{
|
route
|
[
constantize_controller
(
route
[
:controller
]),
route
[
:action
]]
}
.
select
{
|
(
controller
,
action
)
|
controller
&
.
include?
(
ControllerWithFeatureCategory
)
}
.
reject
{
|
(
controller
,
action
)
|
controller
==
Devise
::
UnlocksController
}
.
reject
{
|
(
controller
,
action
)
|
controller
==
ApplicationController
||
controller
==
Devise
::
UnlocksController
}
end
let_it_be
(
:routes_without_category
)
do
...
...
@@ -29,7 +29,7 @@ RSpec.describe "Every controller" do
'H'
,
'I'
,
'J'
,
'K'
,
'L'
,
'M'
,
'N'
,
'O'
,
'Q'
,
'R'
,
'S'
,
'T'
,
'U'
,
'V'
,
'W'
,
'X'
,
'Y'
,
'Z'
,
'X'
,
'Y'
,
'Z'
,
'A'
,
'Projects::MergeRequestsController'
)
"
#{
controller
}
#
#{
action
}
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment