import os import sys from pathlib import Path import requests token = os.environ.get("GITEA_TOKEN") if not token: print("GITEA_TOKEN not set") sys.exit(2) body_path = Path(r"D:\ad-hoc\kei\design_agent\.orchestrator\drafts\15_stage_simulation-plan_claude_r1.md") body = body_path.read_text(encoding="utf-8") url = "https://gitea.hmac.kr/api/v1/repos/Kyeongmin/C.E.L_Slide_test2/issues/15/comments" resp = requests.post( url, headers={"Authorization": f"token {token}"}, json={"body": body}, timeout=30, ) print(resp.status_code) try: j = resp.json() print("id=", j.get("id")) print("html_url=", j.get("html_url")) except Exception: print(resp.text[:500])