debian-mirror-gitlab/spec/support/helpers/harbor_helper.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
727 B
Ruby
Raw Permalink Normal View History

2022-08-13 15:12:31 +05:30
# 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