From 478c15fa8940d0669e57aa9e5c0a3dd927c76e5c Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Tue, 20 Nov 2018 16:15:09 +0100 Subject: [PATCH] Exclude runners tokens from GitLab project exports --- lib/gitlab/import_export/import_export.yml | 4 ++++ lib/gitlab/import_export/relation_factory.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/gitlab/import_export/import_export.yml b/lib/gitlab/import_export/import_export.yml index 9790818ecaf..8a03b0e87b7 100644 --- a/lib/gitlab/import_export/import_export.yml +++ b/lib/gitlab/import_export/import_export.yml @@ -101,6 +101,7 @@ excluded_attributes: - :import_error - :mirror - :runners_token + - :runners_token_encrypted - :repository_storage - :repository_read_only - :lfs_enabled @@ -116,6 +117,9 @@ excluded_attributes: - :remote_mirror_available_overridden - :description_html - :repository_languages + namespaces: + - :runners_token + - :runners_token_encrypted prometheus_metrics: - :common - :identifier diff --git a/lib/gitlab/import_export/relation_factory.rb b/lib/gitlab/import_export/relation_factory.rb index 2486b1e4921..ca574d51b63 100644 --- a/lib/gitlab/import_export/relation_factory.rb +++ b/lib/gitlab/import_export/relation_factory.rb @@ -31,7 +31,7 @@ module Gitlab EXISTING_OBJECT_CHECK = %i[milestone milestones label labels project_label project_labels group_label group_labels project_feature].freeze - TOKEN_RESET_MODELS = %w[Ci::Trigger Ci::Build ProjectHook].freeze + TOKEN_RESET_MODELS = %w[Project Namespace Group Ci::Trigger Ci::Build ProjectHook].freeze def self.create(*args) new(*args).create -- GitLab