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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
9736eff0
Commit
9736eff0
authored
6 years ago
by
Filipa Lacerda
Committed by
Phil Hughes
6 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removes feature flag for ciEnvironmentsStatusChanges
parent
a407bba8
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
2 additions
and
66 deletions
+2
-66
app/assets/javascripts/vue_merge_request_widget/components/deployment.vue
...cripts/vue_merge_request_widget/components/deployment.vue
+1
-6
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+0
-3
app/serializers/environment_status_entity.rb
app/serializers/environment_status_entity.rb
+1
-1
spec/javascripts/vue_mr_widget/components/deployment_spec.js
spec/javascripts/vue_mr_widget/components/deployment_spec.js
+0
-44
spec/javascripts/vue_mr_widget/mr_widget_options_spec.js
spec/javascripts/vue_mr_widget/mr_widget_options_spec.js
+0
-4
spec/serializers/environment_status_entity_spec.rb
spec/serializers/environment_status_entity_spec.rb
+0
-8
No files found.
app/assets/javascripts/vue_merge_request_widget/components/deployment.vue
View file @
9736eff0
...
@@ -40,10 +40,8 @@ export default {
...
@@ -40,10 +40,8 @@ export default {
failed
:
__
(
'
Failed to deploy to
'
),
failed
:
__
(
'
Failed to deploy to
'
),
},
},
data
()
{
data
()
{
const
features
=
window
.
gon
.
features
||
{};
return
{
return
{
isStopping
:
false
,
isStopping
:
false
,
enableCiEnvironmentsStatusChanges
:
features
.
ciEnvironmentsStatusChanges
,
};
};
},
},
computed
:
{
computed
:
{
...
@@ -74,10 +72,7 @@ export default {
...
@@ -74,10 +72,7 @@ export default {
:
''
;
:
''
;
},
},
shouldRenderDropdown
()
{
shouldRenderDropdown
()
{
return
(
return
this
.
deployment
.
changes
&&
this
.
deployment
.
changes
.
length
>
0
;
this
.
enableCiEnvironmentsStatusChanges
&&
(
this
.
deployment
.
changes
&&
this
.
deployment
.
changes
.
length
>
0
)
);
},
},
},
},
methods
:
{
methods
:
{
...
...
This diff is collapsed.
Click to expand it.
app/controllers/projects/merge_requests_controller.rb
View file @
9736eff0
...
@@ -14,9 +14,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
...
@@ -14,9 +14,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
before_action
:set_issuables_index
,
only:
[
:index
]
before_action
:set_issuables_index
,
only:
[
:index
]
before_action
:authenticate_user!
,
only:
[
:assign_related_issues
]
before_action
:authenticate_user!
,
only:
[
:assign_related_issues
]
before_action
:check_user_can_push_to_source_branch!
,
only:
[
:rebase
]
before_action
:check_user_can_push_to_source_branch!
,
only:
[
:rebase
]
before_action
do
push_frontend_feature_flag
(
:ci_environments_status_changes
)
end
def
index
def
index
@merge_requests
=
@issuables
@merge_requests
=
@issuables
...
...
This diff is collapsed.
Click to expand it.
app/serializers/environment_status_entity.rb
View file @
9736eff0
...
@@ -37,7 +37,7 @@ class EnvironmentStatusEntity < Grape::Entity
...
@@ -37,7 +37,7 @@ class EnvironmentStatusEntity < Grape::Entity
es
.
deployment
.
try
(
:formatted_deployment_time
)
es
.
deployment
.
try
(
:formatted_deployment_time
)
end
end
expose
:changes
,
if:
->
(
*
)
{
Feature
.
enabled?
(
:ci_environments_status_changes
,
project
)
}
expose
:changes
private
private
...
...
This diff is collapsed.
Click to expand it.
spec/javascripts/vue_mr_widget/components/deployment_spec.js
View file @
9736eff0
...
@@ -174,57 +174,13 @@ describe('Deployment component', () => {
...
@@ -174,57 +174,13 @@ describe('Deployment component', () => {
});
});
});
});
describe
(
'
with `features.ciEnvironmentsStatusChanges` enabled
'
,
()
=>
{
beforeEach
(()
=>
{
window
.
gon
=
window
.
gon
||
{};
window
.
gon
.
features
=
window
.
gon
.
features
||
{};
window
.
gon
.
features
.
ciEnvironmentsStatusChanges
=
true
;
vm
=
mountComponent
(
Component
,
{
deployment
:
{
...
deploymentMockData
}
});
});
afterEach
(()
=>
{
window
.
gon
.
features
=
{};
});
it
(
'
renders dropdown with changes
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.js-mr-wigdet-deployment-dropdown
'
)).
not
.
toBeNull
();
expect
(
vm
.
$el
.
querySelector
(
'
.js-deploy-url-feature-flag
'
)).
toBeNull
();
});
});
describe
(
'
with `features.ciEnvironmentsStatusChanges` disabled
'
,
()
=>
{
beforeEach
(()
=>
{
window
.
gon
=
window
.
gon
||
{};
window
.
gon
.
features
=
window
.
gon
.
features
||
{};
window
.
gon
.
features
.
ciEnvironmentsStatusChanges
=
false
;
vm
=
mountComponent
(
Component
,
{
deployment
:
{
...
deploymentMockData
}
});
});
afterEach
(()
=>
{
delete
window
.
gon
.
features
.
ciEnvironmentsStatusChanges
;
});
it
(
'
renders the old link to the review app
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.js-mr-wigdet-deployment-dropdown
'
)).
toBeNull
();
expect
(
vm
.
$el
.
querySelector
(
'
.js-deploy-url-feature-flag
'
)).
not
.
toBeNull
();
});
});
describe
(
'
without changes
'
,
()
=>
{
describe
(
'
without changes
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
window
.
gon
=
window
.
gon
||
{};
window
.
gon
.
features
=
window
.
gon
.
features
||
{};
window
.
gon
.
features
.
ciEnvironmentsStatusChanges
=
true
;
delete
deploymentMockData
.
changes
;
delete
deploymentMockData
.
changes
;
vm
=
mountComponent
(
Component
,
{
deployment
:
{
...
deploymentMockData
}
});
vm
=
mountComponent
(
Component
,
{
deployment
:
{
...
deploymentMockData
}
});
});
});
afterEach
(()
=>
{
delete
window
.
gon
.
features
.
ciEnvironmentsStatusChanges
;
});
it
(
'
renders the link to the review app without dropdown
'
,
()
=>
{
it
(
'
renders the link to the review app without dropdown
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.js-mr-wigdet-deployment-dropdown
'
)).
toBeNull
();
expect
(
vm
.
$el
.
querySelector
(
'
.js-mr-wigdet-deployment-dropdown
'
)).
toBeNull
();
expect
(
vm
.
$el
.
querySelector
(
'
.js-deploy-url-feature-flag
'
)).
not
.
toBeNull
();
expect
(
vm
.
$el
.
querySelector
(
'
.js-deploy-url-feature-flag
'
)).
not
.
toBeNull
();
...
...
This diff is collapsed.
Click to expand it.
spec/javascripts/vue_mr_widget/mr_widget_options_spec.js
View file @
9736eff0
...
@@ -458,10 +458,6 @@ describe('mrWidgetOptions', () => {
...
@@ -458,10 +458,6 @@ describe('mrWidgetOptions', () => {
};
};
beforeEach
(
done
=>
{
beforeEach
(
done
=>
{
window
.
gon
=
window
.
gon
||
{};
window
.
gon
.
features
=
window
.
gon
.
features
||
{};
window
.
gon
.
features
.
ciEnvironmentsStatusChanges
=
true
;
vm
.
mr
.
deployments
.
push
(
vm
.
mr
.
deployments
.
push
(
{
{
...
deploymentMockData
,
...
deploymentMockData
,
...
...
This diff is collapsed.
Click to expand it.
spec/serializers/environment_status_entity_spec.rb
View file @
9736eff0
...
@@ -33,14 +33,6 @@ describe EnvironmentStatusEntity do
...
@@ -33,14 +33,6 @@ describe EnvironmentStatusEntity do
it
{
is_expected
.
not_to
include
(
:metrics_url
)
}
it
{
is_expected
.
not_to
include
(
:metrics_url
)
}
it
{
is_expected
.
not_to
include
(
:metrics_monitoring_url
)
}
it
{
is_expected
.
not_to
include
(
:metrics_monitoring_url
)
}
context
'when :ci_environments_status_changes feature flag is disabled'
do
before
do
stub_feature_flags
(
ci_environments_status_changes:
false
)
end
it
{
is_expected
.
not_to
include
(
:changes
)
}
end
context
'when the user is project maintainer'
do
context
'when the user is project maintainer'
do
before
do
before
do
project
.
add_maintainer
(
user
)
project
.
add_maintainer
(
user
)
...
...
This diff is collapsed.
Click to expand it.
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