This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
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(1)
|
||||
|
||||
with open(
|
||||
r"D:\ad-hoc\kei\design_agent\.orchestrator\drafts\21_stage_test-verify_claude_r2.md",
|
||||
"r",
|
||||
encoding="utf-8",
|
||||
) as f:
|
||||
body = f.read()
|
||||
|
||||
url = "https://gitea.hmac.kr/api/v1/repos/Kyeongmin/C.E.L_Slide_test2/issues/21/comments"
|
||||
response = requests.post(
|
||||
url,
|
||||
headers={"Authorization": f"token {token}"},
|
||||
json={"body": body},
|
||||
timeout=60,
|
||||
)
|
||||
print("HTTP", response.status_code)
|
||||
try:
|
||||
payload = response.json()
|
||||
print("id:", payload.get("id"))
|
||||
print("html_url:", payload.get("html_url"))
|
||||
except Exception:
|
||||
print(response.text[:500])
|
||||
Reference in New Issue
Block a user