Dump json object
All checks were successful
Lint and Syntax Check / build (push) Successful in 11s

This commit is contained in:
Space-Banane
2026-04-04 15:21:10 +02:00
parent 972979a44d
commit cd79af6599

14
main.py
View File

@@ -120,6 +120,7 @@ def build_message(event_object, action_str, type_str):
def sendToAgent(event_object): def sendToAgent(event_object):
headers = {"x-openclaw-token": OPENCLAW_TOKEN, "Content-Type": "application/json"} headers = {"x-openclaw-token": OPENCLAW_TOKEN, "Content-Type": "application/json"}
print(f"Preparing to send notification to Agent for {json.dumps(event_object)}")
if event_object.get("type") == "issue_comment": if event_object.get("type") == "issue_comment":
action_str = "created" action_str = "created"
@@ -338,13 +339,7 @@ def main(args):
set_stored_assignees( set_stored_assignees(
db, event_type, repo_id, event_object["number"], assignees_list db, event_type, repo_id, event_object["number"], assignees_list
) )
print(f"--- {event_object['type'].upper()} {action.capitalize()} ---")
print(f"Title: {event_object['title']}")
print(f"Assignees: {', '.join(event_object['assignees'])}")
print(f"Repo: {event_object['repository']}")
print(f"By: {event_object['sender']}")
# Send to OpenClaw # Send to OpenClaw
if action == "assigned": if action == "assigned":
sendToAgent(event_object) sendToAgent(event_object)
@@ -373,11 +368,6 @@ def main(args):
"url": comment_data.get("html_url"), "url": comment_data.get("html_url"),
} }
print(f"--- {event_object['type'].upper()} {action.capitalize()} ---")
print(f"Title: {event_object['title']}")
print(f"Repo: {event_object['repository']}")
print(f"By: {event_object['sender']}")
sendToAgent(event_object) sendToAgent(event_object)
return { return {