summaryrefslogtreecommitdiff
path: root/app/models/repository.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-08 09:08:18 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-08 09:08:18 +0000
commitae6b82598ff1a9844c132e53799c252225b2c4c1 (patch)
treeee9faae6518819de06fd6f1ded511251bf100ef6 /app/models/repository.rb
parentf9e55cc3c9ec3258051c60562b011bef22075f2a (diff)
downloadgitlab-ce-ae6b82598ff1a9844c132e53799c252225b2c4c1.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r--app/models/repository.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index c3a0e8ec9d9..dc0b5b54fb0 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -2,6 +2,12 @@
require 'securerandom'
+# Explicitly require licensee/license file in order to use Licensee::InvalidLicense class defined in
+# https://github.com/licensee/licensee/blob/v9.14.1/lib/licensee/license.rb#L6
+# The problem is that nested classes are not automatically preloaded which may lead to
+# uninitialized constant exception being raised: https://gitlab.com/gitlab-org/gitlab/-/issues/356658
+require 'licensee/license'
+
class Repository
REF_MERGE_REQUEST = 'merge-requests'
REF_KEEP_AROUND = 'keep-around'