30 lines
717 B
Python
30 lines
717 B
Python
import json
|
|
import os
|
|
import sys
|
|
|
|
import requests
|
|
|
|
token = os.environ.get("GITEA_TOKEN")
|
|
if not token:
|
|
print("ERROR: GITEA_TOKEN not set", file=sys.stderr)
|
|
sys.exit(2)
|
|
|
|
body_path = r"D:\ad-hoc\kei\design_agent\.orchestrator\tmp\claude6_u4_body.md"
|
|
with open(body_path, "r", encoding="utf-8") as f:
|
|
body = f.read()
|
|
|
|
url = "https://gitea.hmac.kr/api/v1/repos/Kyeongmin/C.E.L_Slide_test2/issues/11/comments"
|
|
resp = requests.post(
|
|
url,
|
|
headers={"Authorization": f"token {token}"},
|
|
json={"body": body},
|
|
timeout=30,
|
|
)
|
|
print("status:", 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])
|