debian-mirror-gitlab/spec/support/helpers/harbor_helper.rb
2022-08-13 15:12:31 +05:30

27 lines
727 B
Ruby

# frozen_string_literal: true
module HarborHelper
def harbor_repository_url(container, *args)
if container.is_a?(Project)
project_harbor_repositories_path(container, *args)
else
group_harbor_repositories_path(container, *args)
end
end
def harbor_artifact_url(container, *args)
if container.is_a?(Project)
project_harbor_repository_artifacts_path(container, *args)
else
group_harbor_repository_artifacts_path(container, *args)
end
end
def harbor_tag_url(container, *args)
if container.is_a?(Project)
project_harbor_repository_artifact_tags_path(container, *args)
else
group_harbor_repository_artifact_tags_path(container, *args)
end
end
end