From aa3990ba938853bcda8fe4590b6e1125f5098463 Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Fri, 10 Jan 2025 12:52:50 +0100 Subject: [PATCH] fix(deployer): keep original url as link text --- deployer/src/deployer/analyze_pr.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deployer/src/deployer/analyze_pr.py b/deployer/src/deployer/analyze_pr.py index a425653cd0cd..ef760ed66c26 100644 --- a/deployer/src/deployer/analyze_pr.py +++ b/deployer/src/deployer/analyze_pr.py @@ -172,10 +172,12 @@ def post_about_dangerous_content( for url in sorted(external_urls): count = external_urls[url] # Avoid GitHub mentions. + original_url = url url = url.replace('https://github.com/', 'https://redirect.github.com/') + link = f"<{url}>" if url == original_url else f"[{original_url}](<{url}>)" line = ( f" - {'🚨 ' if url.startswith('http://') else ''}" - f"<{url}> ({count} time{'' if count==1 else 's'})" + f"{link} ({count} time{'' if count == 1 else 's'})" ) if diff_lines: # If this was available and it _did_ fine a URL, then