26 lines
1.1 KiB
Python
Executable File
26 lines
1.1 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
"""Usage: tools/review-report <pr-url> [config] [--effort LEVEL] [--model MODEL] [--out DIR]
|
|
|
|
Runs the full review of werkrevisor (tools/dry-run --llm: rules, Jev, model) and the Codex review in parallel
|
|
on one PR of any Gitea, and writes a draft report to <out>/<server>/<owner>/<repo>-<n>/report.md.
|
|
Nothing is written to Gitea: check each finding, then post the report yourself.
|
|
Needs GITEA_TOKEN with read access, OPENROUTER_API_KEY, TYPESAFE_API_KEY and a Codex CLI logged in;
|
|
it never prints a token. The defaults are config/hsadmin-ng.toml, --effort high, --model gpt-6-astra
|
|
and --out build/review-report.
|
|
|
|
Example:
|
|
GITEA_TOKEN=… tools/review-report https://dev.example.net/team/app/pulls/322
|
|
"""
|
|
import os
|
|
import sys
|
|
|
|
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
|
|
from werkrevisor.reviewreport import main # noqa: E402
|
|
|
|
if __name__ == "__main__":
|
|
if any(a in ("-h", "--help") for a in sys.argv[1:]) or len(sys.argv) < 2:
|
|
print(__doc__.strip())
|
|
sys.exit(0 if len(sys.argv) > 1 else 2)
|
|
sys.exit(main(sys.argv[1:]))
|