|
|
@ -115,25 +115,26 @@ def main():
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
comment = False
|
|
|
|
comment = False
|
|
|
|
|
|
|
|
|
|
|
|
# We should also know who did this thing
|
|
|
|
if comment or edited or newtask:
|
|
|
|
userlookup = tasksearch[0]["authorPHID"]
|
|
|
|
# We should also know who did this thing
|
|
|
|
who = dict(phab.phid.query(phids=[userlookup]))[userlookup]["fullName"]
|
|
|
|
userlookup = tasksearch[0]["authorPHID"]
|
|
|
|
|
|
|
|
who = dict(phab.phid.query(phids=[userlookup]))[userlookup]["fullName"]
|
|
|
|
fulltaskname = phab.phid.query(phids=[data["object"]["phid"]])[data["object"]["phid"]]["fullName"]
|
|
|
|
|
|
|
|
link = "\x032" + phab.phid.query(phids=[data["object"]["phid"]])[data["object"]["phid"]]["uri"]
|
|
|
|
fulltaskname = phab.phid.query(phids=[data["object"]["phid"]])[data["object"]["phid"]]["fullName"]
|
|
|
|
if commentid:
|
|
|
|
link = "\x032" + phab.phid.query(phids=[data["object"]["phid"]])[data["object"]["phid"]]["uri"]
|
|
|
|
link = link + "#" + str(commentid) + "\x03"
|
|
|
|
if commentid:
|
|
|
|
else:
|
|
|
|
link = link + "#" + str(commentid) + "\x03"
|
|
|
|
link = link + "\x03"
|
|
|
|
else:
|
|
|
|
message = "\x033[\x03\x0313"+ fulltaskname +"\x03\x033]\x03 \x0315" + str(who) + "\x03 "
|
|
|
|
link = link + "\x03"
|
|
|
|
if comment == True:
|
|
|
|
message = "\x033[\x03\x0313"+ fulltaskname +"\x03\x033]\x03 \x0315" + str(who) + "\x03 "
|
|
|
|
message = message + "commented on the task: " + link
|
|
|
|
if comment:
|
|
|
|
elif edited == True:
|
|
|
|
message = message + "commented on the task: " + link
|
|
|
|
message = message + "edited a message on the task: " + link
|
|
|
|
elif edited:
|
|
|
|
elif newtask == True:
|
|
|
|
message = message + "edited a message on the task: " + link
|
|
|
|
message = message + "just created this task: " + link
|
|
|
|
elif newtask:
|
|
|
|
print(message)
|
|
|
|
message = message + "just created this task: " + link
|
|
|
|
sendnotice(message)
|
|
|
|
print(message)
|
|
|
|
|
|
|
|
sendnotice(message)
|
|
|
|
|
|
|
|
|
|
|
|
return "OK"
|
|
|
|
return "OK"
|
|
|
|
|
|
|
|
|
|
|
|