Resolve newly introduced EE specific differences in lib/
The following EE specific differences have been introduced/looked over in the lib
directory:
lib/api/project_import.rb
diff --git a/lib/api/project_import.rb b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/lib/api/project_import.rb
index 71891e43dcc..bb1b037c08f 100644
--- a/lib/api/project_import.rb
+++ b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/lib/api/project_import.rb
@@ -59,6 +59,7 @@ module API
}
override_params = import_params.delete(:override_params)
+ filter_attributes_using_license!(override_params) if override_params
project = ::Projects::GitlabProjectsImportService.new(
current_user, project_params, override_params
lib/gitlab/git_ref_validator.rb
diff --git a/lib/gitlab/git_ref_validator.rb b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/lib/gitlab/git_ref_validator.rb
index dfff6823689..7b169b65c48 100644
--- a/lib/gitlab/git_ref_validator.rb
+++ b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/lib/gitlab/git_ref_validator.rb
@@ -6,14 +6,15 @@ module Gitlab
module GitRefValidator
extend self
- EXPANDED_PREFIXES = %w[refs/heads/ refs/remotes/].freeze
- DISALLOWED_PREFIXES = %w[-].freeze
+ EXPANDED_PREFIXES = %w(refs/heads/ refs/remotes/).freeze
+ DISALLOWED_PREFIXES = %w(-).freeze
# Validates a given name against the git reference specification
#
# Returns true for a valid reference name, false otherwise
def validate(ref_name)
- return false if ref_name.start_with?(*(EXPANDED_PREFIXES + DISALLOWED_PREFIXES))
+ return false if ref_name.start_with?(*EXPANDED_PREFIXES)
+ return false if ref_name.start_with?(*DISALLOWED_PREFIXES)
return false if ref_name == 'HEAD'
begin
lib/gitlab/import_export/import_export.yml
diff --git a/lib/gitlab/import_export/import_export.yml b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/lib/gitlab/import_export/import_export.yml
index f3888857bb6..7f295eefcf1 100644
--- a/lib/gitlab/import_export/import_export.yml
+++ b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/lib/gitlab/import_export/import_export.yml
@@ -71,6 +71,9 @@ project_tree:
- protected_branches:
- :merge_access_levels
- :push_access_levels
+ - :unprotect_access_levels
+ - protected_environments:
+ - :deploy_access_levels
- protected_tags:
- :create_access_levels
- :project_feature
@@ -84,6 +87,9 @@ project_tree:
- lists:
- label:
- :priorities
+ - milestone:
+ - events:
+ - :push_event_payload
# Only include the following attributes for the models specified.
included_attributes:
@@ -122,10 +128,18 @@ excluded_attributes:
- :last_activity_at
- :last_repository_updated_at
- :last_repository_check_at
+ - :mirror_user_id
+ - :mirror_trigger_builds
- :storage_version
- :remote_mirror_available_overridden
+ - :only_mirror_protected_branches
+ - :pull_mirror_available_overridden
+ - :mirror_overwrites_diverged_branches
- :description_html
- :repository_languages
+ - :packages_enabled
+ - :mirror_last_update_at
+ - :mirror_last_successful_update_at
- :bfg_object_map
- :detected_repository_languages
- :tag_list
lib/gitlab/project_search_results.rb
diff --git a/lib/gitlab/project_search_results.rb b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/lib/gitlab/project_search_results.rb
index 827f4f77f36..5e77d31760d 100644
--- a/lib/gitlab/project_search_results.rb
+++ b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/lib/gitlab/project_search_results.rb
@@ -134,9 +134,11 @@ module Gitlab
project.repository.commit(key) if Commit.valid_hash?(key)
end
+ # rubocop: disable CodeReuse/ActiveRecord
def project_ids_relation
- project
+ Project.where(id: project).select(:id).reorder(nil)
end
+ # rubocop: enabled CodeReuse/ActiveRecord
def filter_milestones_by_project(milestones)
return Milestone.none unless Ability.allowed?(@current_user, :read_milestone, @project)
It's possible some of these differences are due to changes not yet synced to EE.