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
diff options
context:
space:
mode:
authorMarcel Amirault <4155490-marcel.amirault@users.noreply.gitlab.com>2021-06-08 09:19:34 +0300
committerMarcel Amirault <4155490-marcel.amirault@users.noreply.gitlab.com>2021-06-08 09:19:34 +0300
commitc0d0fdbd442e048dbede48e6b3275aabe4796f63 (patch)
tree4f89b7e9f646904908b1540d44ef62033b63a75a
parent0e3703f6d1f1dc5be5465432c420ab28884251d6 (diff)
parentb764446a6e579ee010cb0f7f1699d8bd17d740fb (diff)
Merge branch 'eread/refactor-edit-on-gitlab-code' into 'main'
Refactor Edit on GitLab code See merge request gitlab-org/gitlab-docs!1862
-rw-r--r--lib/helpers/edit_on_gitlab.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/helpers/edit_on_gitlab.rb b/lib/helpers/edit_on_gitlab.rb
index 2946c1f9..97b4d62a 100644
--- a/lib/helpers/edit_on_gitlab.rb
+++ b/lib/helpers/edit_on_gitlab.rb
@@ -10,20 +10,21 @@ module Nanoc::Helpers
# This should be the path from the doc/ directory for a given file.
docs_content_filename = content_filename_array.join("/")
- if product == "omnibus"
+ case product
+ when "omnibus"
# omnibus-gitlab repo
gitlab_url = "https://gitlab.com/gitlab-org/#{product}-gitlab/blob/master/doc/#{docs_content_filename}"
gitlab_ide_url = "https://gitlab.com/-/ide/project/gitlab-org/#{product}-gitlab/edit/master/-/doc/#{docs_content_filename}"
- elsif product == "runner"
+ when "runner"
# gitlab-runner repo
gitlab_url = "https://gitlab.com/gitlab-org/gitlab-#{product}/blob/master/docs/#{docs_content_filename}"
gitlab_ide_url = "https://gitlab.com/-/ide/project/gitlab-org/gitlab-#{product}/edit/master/-/docs/#{docs_content_filename}"
- elsif product == "charts"
+ when "charts"
# GitLab Helm chart repo
gitlab_url = "https://gitlab.com/gitlab-org/#{product}/gitlab/blob/master/doc/#{docs_content_filename}"
gitlab_ide_url = "https://gitlab.com/-/ide/project/gitlab-org/#{product}/gitlab/edit/master/-/doc/#{docs_content_filename}"
# gitlab-foss and gitlab repos
- elsif product = "ee"
+ when "ee"
gitlab_url = "https://gitlab.com/gitlab-org/gitlab/blob/master/doc/#{docs_content_filename}"
gitlab_ide_url = "https://gitlab.com/-/ide/project/gitlab-org/gitlab/edit/master/-/doc/#{docs_content_filename}"
else