blob: 4c1b0d2b208a94afda02c399c27979086c5fac1c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# frozen_string_literal: true
# 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
feature_category :integrations
def new
@new_branch_data = new_branch_data
end
private
def initial_branch_name
return unless params[:issue_key].present?
Issue.to_branch_name(
params[:issue_key],
params[:issue_summary]
)
end
def new_branch_data
{
initial_branch_name: initial_branch_name,
success_state_svg_path:
ActionController::Base.helpers.image_path('illustrations/empty-state/empty-merge-requests-md.svg')
}
end
end
|