mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 09:27:43 +00:00
docs check: Check only the file and directory GitHub urls of zulip/zulip.
f82cc4ed06 started checking all
zulip/zulip GitHub links in CI. Instead, it should have checked only
zulip/zulip file and directory links since checking other
links require making requests to GitHub servers.
This commit is contained in:
@@ -74,12 +74,15 @@ class BaseDocumentationSpider(scrapy.Spider):
|
|||||||
# homepage, there's no need to check those (which can
|
# homepage, there's no need to check those (which can
|
||||||
# cause errors when chat.zulip.org is being updated).
|
# cause errors when chat.zulip.org is being updated).
|
||||||
return True
|
return True
|
||||||
if "zulip.readthedocs" in url or "zulip.com" in url or "zulip.org" in url or "github.com/zulip/zulip/" in url:
|
if "zulip.readthedocs" in url or "zulip.com" in url or "zulip.org" in url:
|
||||||
# We want CI to check any links to Zulip sites.
|
# We want CI to check any links to Zulip sites.
|
||||||
return False
|
return False
|
||||||
if (len(url) > 4 and url[:4] == "file") or ("localhost" in url):
|
if (len(url) > 4 and url[:4] == "file") or ("localhost" in url):
|
||||||
# We also want CI to check any links to built documentation.
|
# We also want CI to check any links to built documentation.
|
||||||
return False
|
return False
|
||||||
|
if url.startswith(ZULIP_SERVER_GITHUB_FILE_URL_PREFIX) or url.startswith(ZULIP_SERVER_GITHUB_DIRECTORY_URL_PREFIX):
|
||||||
|
# We can verify these links directly in the local git repo without making any requests to GitHub servers.
|
||||||
|
return False
|
||||||
if 'github.com/zulip' in url:
|
if 'github.com/zulip' in url:
|
||||||
# We want to check these links but due to rate limiting from GitHub, these checks often
|
# We want to check these links but due to rate limiting from GitHub, these checks often
|
||||||
# fail in the CI. Thus, we should treat these as external links for now.
|
# fail in the CI. Thus, we should treat these as external links for now.
|
||||||
|
|||||||
Reference in New Issue
Block a user