From 1db4f95334d3dc4be871a3c1099a185f24f9e8b3 Mon Sep 17 00:00:00 2001 From: Michael Biarnes Kiefer Date: Wed, 17 Jan 2024 11:38:06 +0100 Subject: [PATCH] ART-8704: fixed URL construction for distgits --- artbotlib/brew_list.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/artbotlib/brew_list.py b/artbotlib/brew_list.py index 87e1323..e569c67 100644 --- a/artbotlib/brew_list.py +++ b/artbotlib/brew_list.py @@ -114,8 +114,13 @@ async def get_tag_specs(so, tag_spec, data_type, sem) -> str: if data_type.startswith('nvr'): result += f'{component_name}-{component_version}-{component_release}' elif data_type.startswith('distgit'): - distgit_name = component_name.rstrip('-container') - result += f'http://pkgs.devel.redhat.com/cgit/{distgit_name}/commit/?id={component_distgit_commit}' + suffix = "-container" + distgit_name = "" + if suffix in component_name: + distgit_name = component_name.rstrip('container') + distgit_name = distgit_name.rstrip("-") + + result += f'https://pkgs.devel.redhat.com/cgit/containers/{distgit_name}/commit/?id={component_distgit_commit}' elif data_type.startswith('commit'): result += f'{component_upstream_commit_url}' elif data_type.startswith('catalog'):