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-11-08 21:11:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-08 21:11:09 +0300
commitda576e4a0b8e1adc3df559a163b01c962a565ef5 (patch)
treef563a8746fd54a2d638f6b421955220af24c8489 /app/presenters/deployments
parentb5bdf6e5219b3b57107aee49ba7c103affb65dd9 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/presenters/deployments')
-rw-r--r--app/presenters/deployments/deployment_presenter.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/presenters/deployments/deployment_presenter.rb b/app/presenters/deployments/deployment_presenter.rb
index 5ef6fcff974..478c7a85f90 100644
--- a/app/presenters/deployments/deployment_presenter.rb
+++ b/app/presenters/deployments/deployment_presenter.rb
@@ -5,11 +5,14 @@ module Deployments
presents ::Deployment, as: :deployment
delegator_override :tags
+
+ # Note: this returns the path key as 'tags/tag_name' but it is used as a URL in the UI
+
def tags
super.map do |tag|
{
- name: tag,
- path: "tags/#{tag}"
+ name: tag.delete_prefix(Gitlab::Git::TAG_REF_PREFIX),
+ path: tag.delete_prefix('refs/')
}
end
end