diff options
Diffstat (limited to 'app/controllers/jira_connect/app_descriptor_controller.rb')
-rw-r--r-- | app/controllers/jira_connect/app_descriptor_controller.rb | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/app/controllers/jira_connect/app_descriptor_controller.rb b/app/controllers/jira_connect/app_descriptor_controller.rb index 0de42ad2452..a0f387631dd 100644 --- a/app/controllers/jira_connect/app_descriptor_controller.rb +++ b/app/controllers/jira_connect/app_descriptor_controller.rb @@ -44,27 +44,14 @@ class JiraConnect::AppDescriptorController < JiraConnect::ApplicationController def modules modules = { - jiraDevelopmentTool: { - key: 'gitlab-development-tool', - application: { - value: 'GitLab' - }, - name: { - value: 'GitLab' - }, - url: HOME_URL, - logoUrl: logo_url, - capabilities: %w(branch commit pull_request) - }, postInstallPage: { key: 'gitlab-configuration', - name: { - value: 'GitLab Configuration' - }, + name: { value: 'GitLab Configuration' }, url: relative_to_base_path(jira_connect_subscriptions_path) } } + modules.merge!(development_tool_module) modules.merge!(build_information_module) modules.merge!(deployment_information_module) modules.merge!(feature_flag_module) @@ -76,6 +63,25 @@ class JiraConnect::AppDescriptorController < JiraConnect::ApplicationController view_context.image_url('gitlab_logo.png') end + # See https://developer.atlassian.com/cloud/jira/software/modules/development-tool/ + def development_tool_module + { + jiraDevelopmentTool: { + 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' }, + url: HOME_URL, + logoUrl: logo_url, + capabilities: %w(branch commit pull_request) + } + } + end + # See: https://developer.atlassian.com/cloud/jira/software/modules/deployment/ def deployment_information_module { @@ -92,9 +98,7 @@ class JiraConnect::AppDescriptorController < JiraConnect::ApplicationController { jiraFeatureFlagInfoProvider: common_module_properties.merge( actions: {}, # TODO: create, link and list feature flags https://gitlab.com/gitlab-org/gitlab/-/issues/297386 - name: { - value: 'GitLab Feature Flags' - }, + name: { value: 'GitLab Feature Flags' }, key: 'gitlab-feature-flags' ) } |