diff options
author | Fabio Pitino <fpitino@gitlab.com> | 2019-07-30 20:25:07 +0200 |
---|---|---|
committer | Fabio Pitino <fpitino@gitlab.com> | 2019-07-30 20:25:07 +0200 |
commit | 25b9cd6386b68f7d0af26d37a250055cb487c0a3 (patch) | |
tree | 341d5419722be81c1128f996f4b120ace47e8976 | |
parent | b725ba9b0eadfa087888ba304e3963c26ae518b5 (diff) | |
download | gitlab-ce-mr-policy-external-repos.tar.gz |
Remove memoization of sanitized_source_namemr-policy-external-repos
The method should not contribute to the state of the object
-rw-r--r-- | lib/gitlab/ci/build/policy/refs.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/gitlab/ci/build/policy/refs.rb b/lib/gitlab/ci/build/policy/refs.rb index 81f96bdbb67..8fc3dd50f8a 100644 --- a/lib/gitlab/ci/build/policy/refs.rb +++ b/lib/gitlab/ci/build/policy/refs.rb @@ -67,9 +67,7 @@ module Gitlab end def sanitized_source_name(pipeline) - # TODO Memoizing this doesn't seem to make sense with - # pipelines being passed in to #satsified_by? as a param. - @sanitized_source_name ||= pipeline&.source&.delete_suffix('_event') + pipeline&.source&.delete_suffix('_event') end end end |