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>2023-11-14 18:09:52 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-11-14 18:09:52 +0300
commit15c1cc886c5785d49f2a6dae064a1e8290f59f46 (patch)
treeda963cc8eef2a57f70ca325430b59f91191804ba /app/models
parent3a19c55d3a1dda9e0ea041d910bf31d1ddda7acd (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models')
-rw-r--r--app/models/blob_viewer/gitlab_ci_yml.rb7
-rw-r--r--app/models/group.rb2
2 files changed, 7 insertions, 2 deletions
diff --git a/app/models/blob_viewer/gitlab_ci_yml.rb b/app/models/blob_viewer/gitlab_ci_yml.rb
index 9cee536d15b..9f86b93ebc9 100644
--- a/app/models/blob_viewer/gitlab_ci_yml.rb
+++ b/app/models/blob_viewer/gitlab_ci_yml.rb
@@ -7,9 +7,14 @@ module BlobViewer
self.partial_name = 'gitlab_ci_yml'
self.loading_partial_name = 'gitlab_ci_yml_loading'
- self.file_types = %i[gitlab_ci]
self.binary = false
+ # rubocop:disable Lint/UnusedMethodArgument -- The keyword argument is required by the parent class but not here.
+ def self.can_render?(blob, verify_binary: true)
+ blob.path == blob.project.ci_config_path_or_default
+ end
+ # rubocop:enable Lint/UnusedMethodArgument
+
def validation_message(opts)
return @validation_message if defined?(@validation_message)
diff --git a/app/models/group.rb b/app/models/group.rb
index 51c26767569..70831573dfc 100644
--- a/app/models/group.rb
+++ b/app/models/group.rb
@@ -515,7 +515,7 @@ class Group < Namespace
members_from_hiearchy.all_owners.non_invite.each_batch do |relation|
owners += relation.preload(:user).load.reject do |member|
- member.user.project_bot?
+ member.user.nil? || member.user.project_bot?
end
end