Commit 3102da30 authored by Etienne Baqué's avatar Etienne Baqué

Merge branch '2647-remove-jira_connect_create_branch-ff' into 'master'

Remove jira_connect_create_branch feature flag

See merge request gitlab-org/gitlab!67471
parents e8633570 4c3c562c
......@@ -65,17 +65,13 @@ class JiraConnect::AppDescriptorController < JiraConnect::ApplicationController
# See https://developer.atlassian.com/cloud/jira/software/modules/development-tool/
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: {
actions: actions,
actions: {
createBranch: {
templateUrl: new_jira_connect_branch_url + '?issue_key={issue.key}&issue_summary={issue.summary}'
}
},
key: 'gitlab-development-tool',
application: { value: 'GitLab' },
name: { value: 'GitLab' },
......
......@@ -3,18 +3,12 @@
# 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.
class JiraConnect::BranchesController < ApplicationController
before_action :feature_enabled!
feature_category :integrations
def new
@new_branch_data = new_branch_data
end
def self.feature_enabled?(user)
Feature.enabled?(:jira_connect_create_branch, user, default_enabled: :yaml)
end
private
def initial_branch_name
......@@ -32,8 +26,4 @@ class JiraConnect::BranchesController < ApplicationController
success_state_svg_path: ActionController::Base.helpers.image_path('illustrations/merge_requests.svg')
}
end
def feature_enabled!
render_404 unless self.class.feature_enabled?(current_user)
end
end
---
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
......@@ -86,18 +86,5 @@ RSpec.describe JiraConnect::AppDescriptorController do
)
)
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
......@@ -34,18 +34,6 @@ RSpec.describe JiraConnect::BranchesController do
expect(response).to be_successful
expect(assigns(:new_branch_data)).to include('initial_branch_name': nil)
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
context 'when not logged in' do
......
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