# SPDX-FileCopyrightText: 2020 IN COMMON Collective # # SPDX-License-Identifier: AGPL-3.0-or-later module INCOMMON module_function def repo_url(version) case version when /^HEAD/ query="h=#{version}" when /^incommon-map @(.*)/ query="h=HEAD&id=#{$1}" when /^incommon-map (v.*)/ query="h=#{$1}" end URI.parse("https://code.cepheide.org/incommon-map.git/tree/?#{query}").to_s end end