diff options
Diffstat (limited to 'app/controllers/jira_connect/app_descriptor_controller.rb')
-rw-r--r-- | app/controllers/jira_connect/app_descriptor_controller.rb | 41 |
1 files changed, 36 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 |