diff --git a/.github/helper/documentation.py b/.github/helper/documentation.py index 258035e4cf6..6685bf81d11 100644 --- a/.github/helper/documentation.py +++ b/.github/helper/documentation.py @@ -14,6 +14,7 @@ DOCUMENTATION_DOMAINS = [ ] +<<<<<<< HEAD def is_valid_url(url: str) -> bool: parts = urlparse(url) 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 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__":