This commit is contained in:
12
main.py
12
main.py
@@ -120,6 +120,7 @@ def build_message(event_object, action_str, type_str):
|
||||
|
||||
def sendToAgent(event_object):
|
||||
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":
|
||||
action_str = "created"
|
||||
@@ -339,12 +340,6 @@ def main(args):
|
||||
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
|
||||
if action == "assigned":
|
||||
sendToAgent(event_object)
|
||||
@@ -373,11 +368,6 @@ def main(args):
|
||||
"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)
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user