diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /app/controllers/jira_connect | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'app/controllers/jira_connect')
-rw-r--r-- | app/controllers/jira_connect/app_descriptor_controller.rb | 41 | ||||
-rw-r--r-- | app/controllers/jira_connect/subscriptions_controller.rb | 3 |
2 files changed, 39 insertions, 5 deletions
diff --git a/app/controllers/jira_connect/app_descriptor_controller.rb b/app/controllers/jira_connect/app_descriptor_controller.rb index d1ba8a98c64..137f830e40b 100644 --- a/app/controllers/jira_connect/app_descriptor_controller.rb +++ b/app/controllers/jira_connect/app_descriptor_controller.rb @@ -65,6 +65,8 @@ class JiraConnect::AppDescriptorController < JiraConnect::ApplicationController } modules.merge!(build_information_module) + modules.merge!(deployment_information_module) + modules.merge!(feature_flag_module) modules end @@ -73,17 +75,46 @@ class JiraConnect::AppDescriptorController < JiraConnect::ApplicationController view_context.image_url('gitlab_logo.png') end + # See: https://developer.atlassian.com/cloud/jira/software/modules/deployment/ + def deployment_information_module + { + jiraDeploymentInfoProvider: common_module_properties.merge( + actions: {}, # TODO: list deployments + name: { value: "GitLab Deployments" }, + key: "gitlab-deployments" + ) + } + end + + # see: https://developer.atlassian.com/cloud/jira/software/modules/feature-flag/ + def feature_flag_module + { + 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' + }, + key: 'gitlab-feature-flags' + ) + } + end + # See: https://developer.atlassian.com/cloud/jira/software/modules/build/ def build_information_module { - jiraBuildInfoProvider: { - homeUrl: HOME_URL, - logoUrl: logo_url, - documentationUrl: DOC_URL, + jiraBuildInfoProvider: common_module_properties.merge( actions: {}, name: { value: "GitLab CI" }, key: "gitlab-ci" - } + ) + } + end + + def common_module_properties + { + homeUrl: HOME_URL, + logoUrl: logo_url, + documentationUrl: DOC_URL } end diff --git a/app/controllers/jira_connect/subscriptions_controller.rb b/app/controllers/jira_connect/subscriptions_controller.rb index 3ff12f29f10..161280a05fc 100644 --- a/app/controllers/jira_connect/subscriptions_controller.rb +++ b/app/controllers/jira_connect/subscriptions_controller.rb @@ -19,6 +19,9 @@ class JiraConnect::SubscriptionsController < JiraConnect::ApplicationController before_action :allow_rendering_in_iframe, only: :index before_action :verify_qsh_claim!, only: :index before_action :authenticate_user!, only: :create + before_action do + push_frontend_feature_flag(:new_jira_connect_ui, type: :development, default_enabled: :yaml) + end def index @subscriptions = current_jira_installation.subscriptions.preload_namespace_route |