Skip to content

Commit f87d685

Browse files
authored
Skip template strings when verifying links (#456)
## Problem We don't want the link checker to fail when trying to verify links like `https://reddit.com/r/{x['subreddit']}/comments/{x['id']}` ## Solution - Skip links that contain `{`. - Modifying the regex match to exclude `{` will just match on the first segment `https://reddit.com/r/` which is not what we want. ## Type of Change - [x] Infrastructure change (CI configs, etc)
1 parent ca46d3e commit f87d685

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/actions/check-links/check-links.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@
5858
if any(ignore_link in link for ignore_link in ignore_links):
5959
print(f" ⏭️ {link}")
6060
continue
61+
if "{" in link: # template strings don't need to be checked
62+
print(f" ⏭️ {link}")
63+
continue
6164
if link in known_good_links:
6265
good_links.add(link)
6366
print(f" ✅ {link}")

0 commit comments

Comments
 (0)