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-08-26 12:12:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-26 12:12:42 +0300
commit7adf8749c2864ae56ffb3ed89ffbe20e9320683a (patch)
treedca577424c8b3117f5689f6b11b0104347939319 /app/models/project.rb
parenta5872a7f2bbb54bc6868e862fa1c1729d8182832 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb22
1 files changed, 0 insertions, 22 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 175998efe93..02aa56ab9bf 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -2369,28 +2369,6 @@ class Project < ApplicationRecord
.first
end
- def ci_variables_for(ref:, environment: nil)
- cache_key = "ci_variables_for:project:#{self&.id}:ref:#{ref}:environment:#{environment}"
-
- ::Gitlab::SafeRequestStore.fetch(cache_key) do
- uncached_ci_variables_for(ref: ref, environment: environment)
- end
- end
-
- def uncached_ci_variables_for(ref:, environment: nil)
- result = if protected_for?(ref)
- variables
- else
- variables.unprotected
- end
-
- if environment
- result.on_environment(environment)
- else
- result.where(environment_scope: '*')
- end
- end
-
def protected_for?(ref)
raise Repository::AmbiguousRefError if repository.ambiguous_ref?(ref)