Skip to content

Commit 840c85c

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent ee2c097 commit 840c85c

File tree

49 files changed

+636
-2969
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+636
-2969
lines changed

Gemfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ gem 'fog-local', '~> 0.6'
129129
gem 'fog-openstack', '~> 1.0'
130130
gem 'fog-rackspace', '~> 0.1.1'
131131
gem 'fog-aliyun', '~> 0.3'
132-
gem 'gitlab-fog-azure-rm', '~> 1.2.0', require: false
132+
gem 'gitlab-fog-azure-rm', '~> 1.2.0', require: 'fog/azurerm'
133133

134134
# for Google storage
135135
gem 'google-api-client', '~> 0.33'
@@ -290,7 +290,7 @@ gem 'autoprefixer-rails', '10.2.5.1'
290290
gem 'terser', '1.0.2'
291291

292292
gem 'addressable', '~> 2.8'
293-
gem 'gemojione', '~> 3.3'
293+
gem 'tanuki_emoji', '~> 0.5'
294294
gem 'gon', '~> 6.4.0'
295295
gem 'request_store', '~> 1.5'
296296
gem 'base32', '~> 0.3.0'
@@ -348,6 +348,8 @@ group :development do
348348

349349
# thin instead webrick
350350
gem 'thin', '~> 1.8.0'
351+
352+
gem 'sprite-factory', '~> 1.7'
351353
end
352354

353355
group :development, :test do

Gemfile.lock

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,6 @@ GEM
436436
ruby-progressbar (~> 1.4)
437437
fuzzyurl (0.9.0)
438438
gemoji (3.0.1)
439-
gemojione (3.3.0)
440-
json
441439
get_process_mem (0.2.5)
442440
ffi (~> 1.0)
443441
gettext (3.3.6)
@@ -1216,6 +1214,7 @@ GEM
12161214
spring (2.1.1)
12171215
spring-commands-rspec (1.0.4)
12181216
spring (>= 0.9.1)
1217+
sprite-factory (1.7.1)
12191218
sprockets (3.7.2)
12201219
concurrent-ruby (~> 1.0)
12211220
rack (> 1, < 3)
@@ -1246,6 +1245,7 @@ GEM
12461245
sys-filesystem (1.1.9)
12471246
ffi
12481247
sysexits (1.2.0)
1248+
tanuki_emoji (0.5.0)
12491249
temple (0.8.2)
12501250
terminal-table (1.8.0)
12511251
unicode-display_width (~> 1.1, >= 1.1.1)
@@ -1454,7 +1454,6 @@ DEPENDENCIES
14541454
fog-rackspace (~> 0.1.1)
14551455
fugit (~> 1.2.1)
14561456
fuubar (~> 2.2.0)
1457-
gemojione (~> 3.3)
14581457
gettext (~> 3.3)
14591458
gettext_i18n_rails (~> 1.8.0)
14601459
gettext_i18n_rails_js (~> 1.3)
@@ -1622,11 +1621,13 @@ DEPENDENCIES
16221621
spamcheck (~> 0.1.0)
16231622
spring (~> 2.1.0)
16241623
spring-commands-rspec (~> 1.0.4)
1624+
sprite-factory (~> 1.7)
16251625
sprockets (~> 3.7.0)
16261626
sshkey (~> 2.0)
16271627
stackprof (~> 0.2.15)
16281628
state_machines-activerecord (~> 0.8.0)
16291629
sys-filesystem (~> 1.1.6)
1630+
tanuki_emoji (~> 0.5)
16301631
terser (= 1.0.2)
16311632
test-prof (~> 1.0.7)
16321633
test_file_finder (~> 0.1.3)

app/assets/javascripts/emoji/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ let emojiMap = null;
99
let validEmojiNames = null;
1010
export const FALLBACK_EMOJI_KEY = 'grey_question';
1111

12+
// Keep the version in sync with `lib/gitlab/emoji.rb`
1213
export const EMOJI_VERSION = '1';
1314

1415
const isLocalStorageAvailable = AccessorUtilities.canUseLocalStorage();

app/finders/award_emojis_finder.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def validate_params
4040
def validate_name_param
4141
return unless params[:name]
4242

43-
raise ArgumentError, 'Invalid name param' unless params[:name].to_s.in?(Gitlab::Emoji.emojis_names)
43+
raise ArgumentError, 'Invalid name param' unless TanukiEmoji.find_by_alpha_code(params[:name].to_s)
4444
end
4545

4646
def validate_awarded_by_param

app/helpers/emoji_helper.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# frozen_string_literal: true
22

33
module EmojiHelper
4-
def emoji_icon(*args)
5-
raw Gitlab::Emoji.gl_emoji_tag(*args)
4+
def emoji_icon(emoji_name, *options)
5+
emoji = TanukiEmoji.find_by_alpha_code(emoji_name)
6+
raw Gitlab::Emoji.gl_emoji_tag(emoji, *options)
67
end
78
end

app/helpers/reminder_emails_helper.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ def invitation_reminder_salutation(reminder_index, format: nil)
77
s_('InviteReminderEmail|Invitation pending')
88
when 1
99
if format == :html
10-
s_('InviteReminderEmail|Hey there %{wave_emoji}').html_safe % { wave_emoji: Gitlab::Emoji.gl_emoji_tag('wave') }
10+
wave_emoji_tag = Gitlab::Emoji.gl_emoji_tag(TanukiEmoji.find_by_alpha_code('wave'))
11+
s_('InviteReminderEmail|Hey there %{wave_emoji}').html_safe % { wave_emoji: wave_emoji_tag }
1112
else
1213
s_('InviteReminderEmail|Hey there!')
1314
end

app/models/award_emoji.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class AwardEmoji < ApplicationRecord
1414
validates :user, presence: true
1515
validates :awardable, presence: true, unless: :importing?
1616

17-
validates :name, presence: true, inclusion: { in: Gitlab::Emoji.emojis_names }
17+
validates :name, presence: true, 'gitlab/emoji_name': true
1818
validates :name, uniqueness: { scope: [:user, :awardable_type, :awardable_id] }, unless: -> { ghost_user? || importing? }
1919

2020
participant :user

app/models/ci/build.rb

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,19 @@ def job_jwt_variables
12141214
end
12151215

12161216
def kubernetes_variables
1217-
[] # Overridden in EE
1217+
::Gitlab::Ci::Variables::Collection.new.tap do |collection|
1218+
# A cluster deployemnt may also define a KUBECONFIG variable, so to keep existing
1219+
# configurations working we shouldn't overwrite it here.
1220+
# This check will be removed when Cluster and Agent configurations are
1221+
# merged in https://gitlab.com/gitlab-org/gitlab/-/issues/335089
1222+
break collection if deployment&.deployment_cluster
1223+
1224+
template = ::Ci::GenerateKubeconfigService.new(self).execute # rubocop: disable CodeReuse/ServiceClass
1225+
1226+
if template.valid?
1227+
collection.append(key: 'KUBECONFIG', value: template.to_yaml, public: false, file: true)
1228+
end
1229+
end
12181230
end
12191231

12201232
def conditionally_allow_failure!(exit_code)

app/models/ci/pipeline.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,6 +1264,16 @@ def predefined_vars_in_builder_enabled?
12641264
end
12651265
end
12661266

1267+
def authorized_cluster_agents
1268+
strong_memoize(:authorized_cluster_agents) do
1269+
if ::Feature.enabled?(:group_authorized_agents, project, default_enabled: :yaml)
1270+
::Clusters::AgentAuthorizationsFinder.new(project).execute.map(&:agent)
1271+
else
1272+
::Clusters::DeployableAgentsFinder.new(project).execute
1273+
end
1274+
end
1275+
end
1276+
12671277
private
12681278

12691279
def add_message(severity, content)

app/models/custom_emoji.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class CustomEmoji < ApplicationRecord
3131
private
3232

3333
def valid_emoji_name
34-
if Gitlab::Emoji.emoji_exists?(name)
34+
if TanukiEmoji.find_by_alpha_code(name)
3535
errors.add(:name, _('%{name} is already being used for another emoji') % { name: self.name })
3636
end
3737
end

0 commit comments

Comments
 (0)