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
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-12-18 06:11:52 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-12-18 06:11:52 +0300
commit77c803f52899ccc450c183a959913ea89d85de88 (patch)
treeef1274446cffb2a1aee02a93853cfa4553b0ba03 /app
parente22373c9e6f3b8c4587844807b0f52a12f41d91c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/super_sidebar/components/help_center.vue2
-rw-r--r--app/models/integration.rb11
-rw-r--r--app/models/integrations/apple_app_store.rb26
-rw-r--r--app/models/integrations/field.rb6
4 files changed, 35 insertions, 10 deletions
diff --git a/app/assets/javascripts/super_sidebar/components/help_center.vue b/app/assets/javascripts/super_sidebar/components/help_center.vue
index 4e0d05add85..5278bd66f47 100644
--- a/app/assets/javascripts/super_sidebar/components/help_center.vue
+++ b/app/assets/javascripts/super_sidebar/components/help_center.vue
@@ -251,7 +251,7 @@ export default {
<template #list-item="{ item }">
<span class="gl-display-flex gl-justify-content-space-between gl-align-items-center">
{{ item.text }}
- <gl-icon v-if="item.icon" :name="item.icon" class="gl-text-purple-600" />
+ <gl-icon v-if="item.icon" :name="item.icon" class="gl-text-gray-500" />
</span>
</template>
</gl-disclosure-dropdown-group>
diff --git a/app/models/integration.rb b/app/models/integration.rb
index c7161574a17..618f9f986e8 100644
--- a/app/models/integration.rb
+++ b/app/models/integration.rb
@@ -526,6 +526,17 @@ class Integration < ApplicationRecord
fields.reject { _1[:type] == :password || _1[:name] == 'webhook' || (_1.key?(:if) && _1[:if] != true) }.pluck(:name)
end
+ def self.api_fields
+ fields.map do |field|
+ {
+ required: field.required?,
+ name: field.name.to_sym,
+ type: field.api_type,
+ desc: field.description
+ }
+ end
+ end
+
def form_fields
fields.reject { _1[:api_only] == true || (_1.key?(:if) && _1[:if] != true) }
end
diff --git a/app/models/integrations/apple_app_store.rb b/app/models/integrations/apple_app_store.rb
index f8fddf8a457..a248a1aa561 100644
--- a/app/models/integrations/apple_app_store.rb
+++ b/app/models/integrations/apple_app_store.rb
@@ -21,21 +21,31 @@ module Integrations
field :app_store_issuer_id,
section: SECTION_TYPE_CONNECTION,
required: true,
- title: -> { s_('AppleAppStore|The Apple App Store Connect Issuer ID.') }
+ title: -> { s_('AppleAppStore|Apple App Store Connect issuer ID') },
+ description: -> { s_('AppleAppStore|Apple App Store Connect issuer ID.') }
field :app_store_key_id,
section: SECTION_TYPE_CONNECTION,
required: true,
- title: -> { s_('AppleAppStore|The Apple App Store Connect Key ID.') }
+ title: -> { s_('AppleAppStore|Apple App Store Connect key ID') },
+ description: -> { s_('AppleAppStore|Apple App Store Connect key ID.') }
- field :app_store_private_key_file_name, section: SECTION_TYPE_CONNECTION
- field :app_store_private_key, api_only: true
+ field :app_store_private_key_file_name,
+ description: -> { s_('Apple App Store Connect private key file name.') },
+ section: SECTION_TYPE_CONNECTION,
+ required: true
+
+ field :app_store_private_key,
+ description: -> { s_('Apple App Store Connect private key.') },
+ required: true,
+ api_only: true
field :app_store_protected_refs,
type: :checkbox,
section: SECTION_TYPE_CONFIGURATION,
title: -> { s_('AppleAppStore|Protected branches and tags only') },
- checkbox_label: -> { s_('AppleAppStore|Only set variables on protected branches and tags') }
+ description: -> { s_('AppleAppStore|Set variables on protected branches and tags only.') },
+ checkbox_label: -> { s_('AppleAppStore|Set variables on protected branches and tags only.') }
def self.title
'Apple App Store Connect'
@@ -55,10 +65,10 @@ module Integrations
# rubocop:disable Layout/LineLength
texts = [
- s_("Use the Apple App Store Connect integration to easily connect to the Apple App Store with Fastlane in CI/CD pipelines."),
- s_("After the Apple App Store Connect integration is activated, the following protected variables will be created for CI/CD use."),
+ s_("Use this integration to connect to the Apple App Store with fastlane in CI/CD pipelines."),
+ s_("After you enable the integration, the following protected variables are created for CI/CD use:"),
variable_list.join('<br>'),
- s_(format("To get started, see the <a href='%{url}' target='_blank'>integration documentation</a> for instructions on how to generate App Store Connect credentials, and how to use this integration.", url: Rails.application.routes.url_helpers.help_page_url('user/project/integrations/apple_app_store'))).html_safe
+ s_(format("For more information, see the <a href='%{url}' target='_blank'>documentation</a>.", url: Rails.application.routes.url_helpers.help_page_url('user/project/integrations/apple_app_store'))).html_safe
]
# rubocop:enable Layout/LineLength
diff --git a/app/models/integrations/field.rb b/app/models/integrations/field.rb
index 9dc90629344..324848daf4f 100644
--- a/app/models/integrations/field.rb
+++ b/app/models/integrations/field.rb
@@ -6,7 +6,7 @@ module Integrations
ATTRIBUTES = %i[
section type placeholder choices value checkbox_label
- title help if
+ title help if description
non_empty_password_help
non_empty_password_title
].concat(BOOLEAN_ATTRIBUTES).freeze
@@ -60,6 +60,10 @@ module Integrations
define_method("#{type}?") { self[:type] == type }
end
+ def api_type
+ checkbox? ? ::API::Integrations::Boolean : String
+ end
+
private
attr_reader :attributes