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:
Diffstat (limited to 'qa/qa/resource/package.rb')
-rw-r--r--qa/qa/resource/package.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/qa/qa/resource/package.rb b/qa/qa/resource/package.rb
index 1009353a296..0e8c3ee95de 100644
--- a/qa/qa/resource/package.rb
+++ b/qa/qa/resource/package.rb
@@ -15,11 +15,10 @@ module QA
end
attribute :id do
- packages = project.packages
-
- return unless (this_package = packages&.find { |package| package[:name] == "#{project.path_with_namespace}/#{name}" }) # rubocop:disable Cop/AvoidReturnFromBlocks
+ this_package = project.packages
+ &.find { |package| package[:name] == name }
- this_package[:id]
+ this_package.try(:fetch, :id)
end
def fabricate!