Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-23 15:09:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-23 15:09:05 +0300
commitab8eecd62cc11a31568b25304f5fd31c8b7f437f (patch)
treeb73b765c3cea414112840fd8041c62f886d8ce53 /app/controllers/jira_connect/app_descriptor_controller.rb
parent00a889ea7a115ebbda95a071dd630f93b79261e3 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/jira_connect/app_descriptor_controller.rb')
-rw-r--r--app/controllers/jira_connect/app_descriptor_controller.rb44
1 files changed, 26 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..ec3327cc20e 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,29 @@ 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
+ 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,
+ 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 +102,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'
)
}