Skip to content

Commit

Permalink
fix(deployer): keep original url as link text
Browse files Browse the repository at this point in the history
  • Loading branch information
caugner committed Jan 10, 2025
1 parent efad4a8 commit aa3990b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deployer/src/deployer/analyze_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit aa3990b

Please sign in to comment.