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>2022-12-03 09:07:06 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-03 09:07:06 +0300
commita3759fc2e1f8aa1493840ab0d4ebd4a2e5f495aa (patch)
treefb8f046819669955006fe21043bfcc13dbe40209 /app/models
parent336483a4c150a112e83d95538218c59d9a952768 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models')
-rw-r--r--app/models/integrations/chat_message/pipeline_message.rb2
-rw-r--r--app/models/integrations/field.rb2
-rw-r--r--app/models/label.rb2
-rw-r--r--app/models/merge_request.rb2
-rw-r--r--app/models/milestone.rb2
5 files changed, 5 insertions, 5 deletions
diff --git a/app/models/integrations/chat_message/pipeline_message.rb b/app/models/integrations/chat_message/pipeline_message.rb
index 88db40bea7f..815b260f6a3 100644
--- a/app/models/integrations/chat_message/pipeline_message.rb
+++ b/app/models/integrations/chat_message/pipeline_message.rb
@@ -96,7 +96,7 @@ module Integrations
failed_jobs = builds.select do |build|
# Select jobs which doesn't have a successful retry
- build[:status] == 'failed' && !succeeded_job_names.include?(build[:name])
+ build[:status] == 'failed' && succeeded_job_names.exclude?(build[:name])
end
failed_jobs.uniq { |job| job[:name] }.reverse
diff --git a/app/models/integrations/field.rb b/app/models/integrations/field.rb
index 53c8f5f623e..5931a34fca9 100644
--- a/app/models/integrations/field.rb
+++ b/app/models/integrations/field.rb
@@ -28,7 +28,7 @@ module Integrations
invalid_attributes = attributes.keys - ATTRIBUTES
if invalid_attributes.present?
raise ArgumentError, "Invalid attributes #{invalid_attributes.inspect}"
- elsif !TYPES.include?(self[:type])
+ elsif TYPES.exclude?(self[:type])
raise ArgumentError, "Invalid type #{self[:type].inspect}"
end
end
diff --git a/app/models/label.rb b/app/models/label.rb
index aa53c0e0f3f..8637df72fed 100644
--- a/app/models/label.rb
+++ b/app/models/label.rb
@@ -285,7 +285,7 @@ class Label < ApplicationRecord
def label_format_reference(format = :id)
raise StandardError, 'Unknown format' unless [:id, :name].include?(format)
- if format == :name && !name.include?('"')
+ if format == :name && name.exclude?('"')
%("#{name}")
else
id
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index 6987bccadcb..cccf2c918b0 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -733,7 +733,7 @@ class MergeRequest < ApplicationRecord
def merge_participants
participants = [author]
- if auto_merge_enabled? && !participants.include?(merge_user)
+ if auto_merge_enabled? && participants.exclude?(merge_user)
participants << merge_user
end
diff --git a/app/models/milestone.rb b/app/models/milestone.rb
index da07d8dd9fc..ba5b84add7d 100644
--- a/app/models/milestone.rb
+++ b/app/models/milestone.rb
@@ -263,7 +263,7 @@ class Milestone < ApplicationRecord
raise ArgumentError, _('Cannot refer to a group milestone by an internal id!')
end
- if format == :name && !name.include?('"')
+ if format == :name && name.exclude?('"')
%("#{name}")
else
iid