mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 15:42:52 +00:00
ci: fix docs checker for wiki based docs (#27380)
(cherry picked from commit 5596988c94)
# Conflicts:
# .github/helper/documentation.py
This commit is contained in:
14
.github/helper/documentation.py
vendored
14
.github/helper/documentation.py
vendored
@@ -14,6 +14,7 @@ DOCUMENTATION_DOMAINS = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
def is_valid_url(url: str) -> bool:
|
def is_valid_url(url: str) -> bool:
|
||||||
parts = urlparse(url)
|
parts = urlparse(url)
|
||||||
return all((parts.scheme, parts.netloc, parts.path))
|
return all((parts.scheme, parts.netloc, parts.path))
|
||||||
@@ -65,6 +66,19 @@ def check_pull_request(number: str) -> "tuple[int, str]":
|
|||||||
return 0, "Documentation Link Found. You're Awesome! 🎉"
|
return 0, "Documentation Link Found. You're Awesome! 🎉"
|
||||||
|
|
||||||
return 1, "Documentation Link Not Found! ⚠️"
|
return 1, "Documentation Link Not Found! ⚠️"
|
||||||
|
=======
|
||||||
|
def docs_link_exists(body):
|
||||||
|
for line in body.splitlines():
|
||||||
|
for word in line.split():
|
||||||
|
if word.startswith('http') and uri_validator(word):
|
||||||
|
parsed_url = urlparse(word)
|
||||||
|
if parsed_url.netloc == "github.com":
|
||||||
|
parts = parsed_url.path.split('/')
|
||||||
|
if len(parts) == 5 and parts[1] == "frappe" and parts[2] in docs_repos:
|
||||||
|
return True
|
||||||
|
elif parsed_url.netloc == "docs.erpnext.com":
|
||||||
|
return True
|
||||||
|
>>>>>>> 5596988c94 (ci: fix docs checker for wiki based docs (#27380))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Reference in New Issue
Block a user