Unverified Commit fc2b4ef3 authored by Adriaan de Groot's avatar Adriaan de Groot Committed by Jonah Brüchert
Browse files

Don't encode IDs at all

The encoding of IDs (to acceptable URL values) is done in python-gitlab,
so don't do that here. Between python-gitlab 2.6.0 and 2.7.0 the
encoding implementation changed (to handle more cases, for Debian
repository-naming-rules) which breaks when it is handed an already-
encoded ID.
parent cd2edaab
......@@ -69,14 +69,14 @@ class Utils:
def str_id_for_url(url: str) -> str:
Returns the url encoded string id for a repository
Returns the unencoded string id for a repository
normalized_url: str = Utils.normalize_url(url)
normalized_url = removesuffix(normalized_url, ".git")
normalized_url = removesuffix(normalized_url, "/")
repository_url: ParseResult = urlparse(normalized_url)
return quote_plus(repository_url.path[1:], safe='/')
return repository_url.path[1:]
def log(log_type: LogType, *message: str) -> None:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment