Use standard review guide

This commit is contained in:
Pinghua
2026-06-12 17:44:42 +08:00
parent e572d69dda
commit e7830eb058
3 changed files with 58 additions and 4 deletions
+16
View File
@@ -178,3 +178,19 @@ def format_issues_markdown(issues):
f"\n{iss['body']}\n"
)
return "\n".join(parts)
_STANDARDS_URL = "/api/v1/repos/zeekrAI/knowledge-base/raw/docs/process/code-review.md?ref=main"
def fetch_standards_doc(gitea_url, api_token):
"""Fetch the code-review standards document from Gitea via API.
Returns the raw markdown text, or ``""`` on failure.
"""
try:
return _api_req(gitea_url, api_token, "GET", _STANDARDS_URL).decode(
"utf-8", errors="replace"
)
except Exception:
return ""