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
4c3c562c
Commit
4c3c562c
authored
Aug 04, 2021
by
Tom Quirk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove jira_connect_create_branch feature flag
Changelog: other
parent
432f80e4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
52 deletions
+5
-52
app/controllers/jira_connect/app_descriptor_controller.rb
app/controllers/jira_connect/app_descriptor_controller.rb
+5
-9
app/controllers/jira_connect/branches_controller.rb
app/controllers/jira_connect/branches_controller.rb
+0
-10
config/feature_flags/development/jira_connect_create_branch.yml
.../feature_flags/development/jira_connect_create_branch.yml
+0
-8
spec/controllers/jira_connect/app_descriptor_controller_spec.rb
...ontrollers/jira_connect/app_descriptor_controller_spec.rb
+0
-13
spec/controllers/jira_connect/branches_controller_spec.rb
spec/controllers/jira_connect/branches_controller_spec.rb
+0
-12
No files found.
app/controllers/jira_connect/app_descriptor_controller.rb
View file @
4c3c562c
...
@@ -65,17 +65,13 @@ class JiraConnect::AppDescriptorController < JiraConnect::ApplicationController
...
@@ -65,17 +65,13 @@ class JiraConnect::AppDescriptorController < JiraConnect::ApplicationController
# See https://developer.atlassian.com/cloud/jira/software/modules/development-tool/
# See https://developer.atlassian.com/cloud/jira/software/modules/development-tool/
def
development_tool_module
def
development_tool_module
actions
=
{}
if
JiraConnect
::
BranchesController
.
feature_enabled?
(
current_user
)
actions
[
:createBranch
]
=
{
templateUrl:
new_jira_connect_branch_url
+
'?issue_key={issue.key}&issue_summary={issue.summary}'
}
end
{
{
jiraDevelopmentTool:
{
jiraDevelopmentTool:
{
actions:
actions
,
actions:
{
createBranch:
{
templateUrl:
new_jira_connect_branch_url
+
'?issue_key={issue.key}&issue_summary={issue.summary}'
}
},
key:
'gitlab-development-tool'
,
key:
'gitlab-development-tool'
,
application:
{
value:
'GitLab'
},
application:
{
value:
'GitLab'
},
name:
{
value:
'GitLab'
},
name:
{
value:
'GitLab'
},
...
...
app/controllers/jira_connect/branches_controller.rb
View file @
4c3c562c
...
@@ -3,18 +3,12 @@
...
@@ -3,18 +3,12 @@
# NOTE: This controller does not inherit from JiraConnect::ApplicationController
# NOTE: This controller does not inherit from JiraConnect::ApplicationController
# because we don't receive a JWT for this action, so we rely on standard GitLab authentication.
# because we don't receive a JWT for this action, so we rely on standard GitLab authentication.
class
JiraConnect::BranchesController
<
ApplicationController
class
JiraConnect::BranchesController
<
ApplicationController
before_action
:feature_enabled!
feature_category
:integrations
feature_category
:integrations
def
new
def
new
@new_branch_data
=
new_branch_data
@new_branch_data
=
new_branch_data
end
end
def
self
.
feature_enabled?
(
user
)
Feature
.
enabled?
(
:jira_connect_create_branch
,
user
,
default_enabled: :yaml
)
end
private
private
def
initial_branch_name
def
initial_branch_name
...
@@ -32,8 +26,4 @@ class JiraConnect::BranchesController < ApplicationController
...
@@ -32,8 +26,4 @@ class JiraConnect::BranchesController < ApplicationController
success_state_svg_path:
ActionController
::
Base
.
helpers
.
image_path
(
'illustrations/merge_requests.svg'
)
success_state_svg_path:
ActionController
::
Base
.
helpers
.
image_path
(
'illustrations/merge_requests.svg'
)
}
}
end
end
def
feature_enabled!
render_404
unless
self
.
class
.
feature_enabled?
(
current_user
)
end
end
end
config/feature_flags/development/jira_connect_create_branch.yml
deleted
100644 → 0
View file @
432f80e4
---
name
:
jira_connect_create_branch
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/66032
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/336191
milestone
:
'
14.2'
type
:
development
group
:
group::ecosystem
default_enabled
:
false
spec/controllers/jira_connect/app_descriptor_controller_spec.rb
View file @
4c3c562c
...
@@ -86,18 +86,5 @@ RSpec.describe JiraConnect::AppDescriptorController do
...
@@ -86,18 +86,5 @@ RSpec.describe JiraConnect::AppDescriptorController do
)
)
)
)
end
end
context
'when the jira_connect_create_branch feature is disabled'
do
before
do
stub_feature_flags
(
jira_connect_create_branch:
false
)
end
it
'does not include the create branch action'
do
get
:show
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
expect
(
descriptor
[
:modules
][
:jiraDevelopmentTool
][
:actions
]).
not_to
include
(
:createBranch
)
end
end
end
end
end
end
spec/controllers/jira_connect/branches_controller_spec.rb
View file @
4c3c562c
...
@@ -34,18 +34,6 @@ RSpec.describe JiraConnect::BranchesController do
...
@@ -34,18 +34,6 @@ RSpec.describe JiraConnect::BranchesController do
expect
(
response
).
to
be_successful
expect
(
response
).
to
be_successful
expect
(
assigns
(
:new_branch_data
)).
to
include
(
'initial_branch_name'
:
nil
)
expect
(
assigns
(
:new_branch_data
)).
to
include
(
'initial_branch_name'
:
nil
)
end
end
context
'when feature flag is disabled'
do
before
do
stub_feature_flags
(
jira_connect_create_branch:
false
)
end
it
'renders a 404 error'
do
get
:new
expect
(
response
).
to
be_not_found
end
end
end
end
context
'when not logged in'
do
context
'when not logged in'
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