diff --git a/deployer/src/deployer/analyze_pr.py b/deployer/src/deployer/analyze_pr.py index 3e965d10d024..69491289e11e 100644 --- a/deployer/src/deployer/analyze_pr.py +++ b/deployer/src/deployer/analyze_pr.py @@ -171,9 +171,15 @@ def post_about_dangerous_content( external_urls_list = [] 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