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
eb9a1a27
Commit
eb9a1a27
authored
Jan 21, 2020
by
Pavel Shutsin
Committed by
Douglas Barbosa Alexandre
Jan 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Code Review Analytics feature flag
This makes Code Review Analytics generally available
parent
5e1fdec0
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
20 additions
and
51 deletions
+20
-51
doc/user/analytics/code_review_analytics.md
doc/user/analytics/code_review_analytics.md
+0
-10
doc/user/analytics/index.md
doc/user/analytics/index.md
+1
-2
ee/app/helpers/ee/projects_helper.rb
ee/app/helpers/ee/projects_helper.rb
+1
-1
ee/app/views/layouts/nav/sidebar/_project_analytics_link.html.haml
...ews/layouts/nav/sidebar/_project_analytics_link.html.haml
+1
-1
ee/changelogs/unreleased/194165-remove-code-reivew-analytics-feature-flag.yml
...ased/194165-remove-code-reivew-analytics-feature-flag.yml
+5
-0
ee/config/routes/project.rb
ee/config/routes/project.rb
+1
-3
ee/lib/api/analytics/code_review_analytics.rb
ee/lib/api/analytics/code_review_analytics.rb
+0
-4
ee/spec/features/analytics/code_analytics_spec.rb
ee/spec/features/analytics/code_analytics_spec.rb
+11
-17
ee/spec/requests/api/analytics/code_review_analytics_spec.rb
ee/spec/requests/api/analytics/code_review_analytics_spec.rb
+0
-12
ee/spec/requests/projects/analytics/code_reviews_controller_spec.rb
...quests/projects/analytics/code_reviews_controller_spec.rb
+0
-1
No files found.
doc/user/analytics/code_review_analytics.md
View file @
eb9a1a27
...
...
@@ -47,13 +47,3 @@ and trends between them. For example:
-
On
[
Starter or Bronze tier
](
https://about.gitlab.com/pricing/
)
and above.
-
By users with Reporter access and above.
## Disable with feature flag
Code Review Analytics is
[
currently enabled by a feature flag
](
https://gitlab.com/gitlab-org/gitlab/issues/194165
)
that defaults to ON, meaning the feature is available. If you experience performance problems or
otherwise wish to disable the feature, a GitLab administrator can execute a command in a Rails console:
```
ruby
Feature
.
disable
(
:code_review_analytics
)
```
doc/user/analytics/index.md
View file @
eb9a1a27
...
...
@@ -15,8 +15,7 @@ Once enabled, click on **Analytics** from the top navigation bar.
From the centralized analytics workspace, the following analytics are available:
-
[
Code Review Analytics
](
code_review_analytics.md
)
, enabled with the
`code_review_analytics`
[
feature flag
](
../../development/feature_flags/development.md#enabling-a-feature-flag-in-development
)
.
**(STARTER)**
-
[
Code Review Analytics
](
code_review_analytics.md
)
.
**(STARTER)**
-
[
Cycle Analytics
](
cycle_analytics.md
)
, enabled with the
`cycle_analytics`
[
feature flag
](
../../development/feature_flags/development.md#enabling-a-feature-flag-in-development
)
.
**(PREMIUM)**
-
[
Productivity Analytics
](
productivity_analytics.md
)
, enabled with the
`productivity_analytics`
...
...
ee/app/helpers/ee/projects_helper.rb
View file @
eb9a1a27
...
...
@@ -59,7 +59,7 @@ module EE
nav_tabs
<<
:packages
end
if
::
Feature
.
enabled?
(
:code_review_analytics
,
project
,
default_enabled:
true
)
if
can?
(
current_user
,
:read_code_review_analytics
,
project
)
nav_tabs
<<
:code_review
end
...
...
ee/app/views/layouts/nav/sidebar/_project_analytics_link.html.haml
View file @
eb9a1a27
-
if
Feature
.
enabled?
(
:code_review_analytics
,
default_enabled:
true
)
&&
can?
(
current_user
,
:read_code_review_analytics
,
@project
)
-
if
can?
(
current_user
,
:read_code_review_analytics
,
@project
)
-
project_analytics_link
=
project_analytics_code_reviews_path
(
@project
)
=
nav_link
controller: :code_review
do
...
...
ee/changelogs/unreleased/194165-remove-code-reivew-analytics-feature-flag.yml
0 → 100644
View file @
eb9a1a27
---
title
:
Remove Code Review Analytics feature flag
merge_request
:
23418
author
:
type
:
changed
ee/config/routes/project.rb
View file @
eb9a1a27
...
...
@@ -79,9 +79,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
resources
:audit_events
,
only:
[
:index
]
namespace
:analytics
do
constraints
(
::
Constraints
::
FeatureConstrainer
.
new
(
:code_review_analytics
,
default_enabled:
true
))
do
resources
:code_reviews
,
only:
[
:index
]
end
resources
:code_reviews
,
only:
[
:index
]
end
draw
:merge_requests_ee
...
...
ee/lib/api/analytics/code_review_analytics.rb
View file @
eb9a1a27
...
...
@@ -28,10 +28,6 @@ module API
end
end
before
do
not_found!
unless
Feature
.
enabled?
(
:code_review_analytics
,
default_enabled:
true
)
end
resource
:analytics
do
desc
'List code review information about project'
do
end
...
...
ee/spec/features/analytics/code_analytics_spec.rb
View file @
eb9a1a27
...
...
@@ -14,28 +14,22 @@ describe 'CodeReviewAnalytics', :js do
project
.
add_reporter
(
user
)
sign_in
(
user
)
end
context
'when the feature is enabled'
do
before
do
stub_feature_flags
(
code_review_analytics:
true
)
visit
project_analytics_code_reviews_path
(
project
)
end
visit
project_analytics_code_reviews_path
(
project
)
end
it
'renders the filtered search bar correctly'
do
page
.
within
(
'.content-wrapper .content .issues-filters'
)
do
expect
(
page
).
to
have_css
(
'.filtered-search-box'
)
end
it
'renders the filtered search bar correctly'
do
page
.
within
(
'.content-wrapper .content .issues-filters'
)
do
expect
(
page
).
to
have_css
(
'.filtered-search-box'
)
end
end
it
'displays label and milestone in search hint'
do
filtered_search
.
click
it
'displays label and milestone in search hint'
do
filtered_search
.
click
page
.
within
(
'#js-dropdown-hint'
)
do
expect
(
page
).
to
have_content
(
'Label'
)
expect
(
page
).
to
have_content
(
'Milestone'
)
end
page
.
within
(
'#js-dropdown-hint'
)
do
expect
(
page
).
to
have_content
(
'Label'
)
expect
(
page
).
to
have_content
(
'Milestone'
)
end
end
end
ee/spec/requests/api/analytics/code_review_analytics_spec.rb
View file @
eb9a1a27
...
...
@@ -56,18 +56,6 @@ describe API::Analytics::CodeReviewAnalytics do
end
end
context
'when feature is disabled'
do
before
do
stub_feature_flags
(
code_review_analytics:
false
)
end
it
'is not found'
do
api_call
expect
(
response
).
to
have_gitlab_http_status
(
:not_found
)
end
end
context
'when user has no authorization'
do
let
(
:current_user
)
{
guest
}
...
...
ee/spec/requests/projects/analytics/code_reviews_controller_spec.rb
View file @
eb9a1a27
...
...
@@ -8,7 +8,6 @@ describe Projects::Analytics::CodeReviewsController, type: :request do
before
do
login_as
user
stub_feature_flags
(
code_review_analytics:
true
)
end
describe
'GET /*namespace_id/:project_id/analytics/code_reviews'
do
...
...
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