Fix safety of `[p]repo list` (#6494)

This commit is contained in:
Jakub Kuczys 2024-12-25 05:09:00 +01:00 committed by GitHub
parent 8ad9c55d50
commit 3888f09cfa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -655,7 +655,11 @@ class Downloader(commands.Cog):
joined += "- **{}:** {}\n - {}\n".format(
repo.name,
repo.short or "",
"<{}>".format(repo.url),
(
f"<{repo.clean_url}>"
if repo.clean_url.startswith(("http://", "https://"))
else repo.clean_url
),
)
for page in pagify(joined, ["\n"], shorten_by=16):