You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In linters/amp_fix_md_links.py, we have the following section handling http links:
if link.startswith("http"):
if not any(
x in link
for x in ["://github.com/cryptokaizen", "://github.com/causify-ai"]
):
# The link is to an external resource; update is not needed.
return line, warnings
if "blob/master" not in link:
# The link is not to a file (but, for example, to an issue);
# update is not needed.
return line, warnings
# Leave only the path to the file in the link.
link = link.split("blob/master")[-1]
What it does is it turns, for example, https://github.com/causify-ai/helpers/blob/master/linters/amp_fix_md_links.py into /linters/amp_fix_md_links.py. However, there is a problem if the link is supposed to point to a file in another repo. For example, if a file in cmamp has this link, then after cutting off the first part, the link will be actually broken because there is no /linters/amp_fix_md_links.py in cmamp.
We need to update the logic and only cut off the first part of the link if the repo name it contains is the same as the local repo (the one where the file that is being linted is located).
The text was updated successfully, but these errors were encountered:
In
linters/amp_fix_md_links.py
, we have the following section handling http links:What it does is it turns, for example,
https://github.com/causify-ai/helpers/blob/master/linters/amp_fix_md_links.py
into/linters/amp_fix_md_links.py
. However, there is a problem if the link is supposed to point to a file in another repo. For example, if a file incmamp
has this link, then after cutting off the first part, the link will be actually broken because there is no/linters/amp_fix_md_links.py
incmamp
.We need to update the logic and only cut off the first part of the link if the repo name it contains is the same as the local repo (the one where the file that is being linted is located).
The text was updated successfully, but these errors were encountered: