debian-mirror-gitlab/app/controllers/jira_connect/branches_controller.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
767 B
Ruby
Raw Normal View History

2021-10-27 15:23:28 +05: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,
2023-07-09 08:55:56 +05:30
success_state_svg_path:
ActionController::Base.helpers.image_path('illustrations/empty-state/empty-merge-requests-md.svg')
2021-10-27 15:23:28 +05:30
}
end
end