fix: undo changes to patch (#26983)
* fix: undo changes to patch
* ci: ignore empty body / head
(cherry picked from commit 8bbec42fa0)
# Conflicts:
# .github/helper/documentation.py
This commit is contained in:
26
.github/helper/documentation.py
vendored
26
.github/helper/documentation.py
vendored
@@ -68,6 +68,32 @@ def check_pull_request(number: str) -> "tuple[int, str]":
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
<<<<<<< HEAD
|
||||
exit_code, message = check_pull_request(sys.argv[1])
|
||||
print(message)
|
||||
sys.exit(exit_code)
|
||||
=======
|
||||
pr = sys.argv[1]
|
||||
response = requests.get("https://api.github.com/repos/frappe/erpnext/pulls/{}".format(pr))
|
||||
|
||||
if response.ok:
|
||||
payload = response.json()
|
||||
title = (payload.get("title") or "").lower().strip()
|
||||
head_sha = (payload.get("head") or {}).get("sha")
|
||||
body = (payload.get("body") or "").lower()
|
||||
|
||||
if (title.startswith("feat")
|
||||
and head_sha
|
||||
and "no-docs" not in body
|
||||
and "backport" not in body
|
||||
):
|
||||
if docs_link_exists(body):
|
||||
print("Documentation Link Found. You're Awesome! 🎉")
|
||||
|
||||
else:
|
||||
print("Documentation Link Not Found! ⚠️")
|
||||
sys.exit(1)
|
||||
|
||||
else:
|
||||
print("Skipping documentation checks... 🏃")
|
||||
>>>>>>> 8bbec42fa0 (fix: undo changes to patch (#26983))
|
||||
|
||||
Reference in New Issue
Block a user