Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Read <eread@gitlab.com>2023-03-02 08:30:10 +0300
committerEvan Read <eread@gitlab.com>2023-03-02 08:30:10 +0300
commit5660a249575e8a509bec92c0381320c182b86d76 (patch)
tree92cd85042663af67fdec58b11d0493ff04308694 /lib
parent2dbcc3ee3b59aaeba5b76ed6a94288156de5be1d (diff)
Fix RuboCop violations for task helpers
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/task_helpers.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/tasks/task_helpers.rb b/lib/tasks/task_helpers.rb
index 460fdc39..576a25a4 100644
--- a/lib/tasks/task_helpers.rb
+++ b/lib/tasks/task_helpers.rb
@@ -19,11 +19,9 @@ class TaskHelpers
end
def products
- @products ||= begin
- # Pull products data from the config.
- PRODUCTS.each_with_object({}) do |key, result|
- result[key] = config['products'][key]
- end
+ # Pull products data from the config.
+ @products ||= PRODUCTS.each_with_object({}) do |key, result|
+ result[key] = config['products'][key]
end
end
@@ -79,10 +77,12 @@ class TaskHelpers
def stable_branch_name
@stable_branch_name ||= begin
ref_name = ENV["CI_COMMIT_REF_NAME"]&.match(VERSION_FORMAT)
- return "#{ref_name[:major]}-#{ref_name[:minor]}-stable" if ref_name
-
- mr_name = ENV["CI_MERGE_REQUEST_TARGET_BRANCH_NAME"]&.match(VERSION_FORMAT)
- "#{mr_name[:major]}-#{mr_name[:minor]}-stable" if mr_name
+ if ref_name
+ "#{ref_name[:major]}-#{ref_name[:minor]}-stable"
+ else
+ mr_name = ENV["CI_MERGE_REQUEST_TARGET_BRANCH_NAME"]&.match(VERSION_FORMAT)
+ "#{mr_name[:major]}-#{mr_name[:minor]}-stable" if mr_name
+ end
end
end