Improve handling of tagging and Github app user interaction

This commit is contained in:
Ori Kotek
2023-07-06 12:58:05 +03:00
parent 0ebd29d398
commit b6333e7f20
5 changed files with 44 additions and 9 deletions

View File

@ -40,7 +40,7 @@ async def handle_request(body):
if "comment" not in body:
return {}
comment_body = body.get("comment", {}).get("body", None)
if "says 'Please" in comment_body:
if 'sender' in body and 'login' in body['sender'] and 'bot' in body['sender']['login']:
return {}
if "issue" not in body and "pull_request" not in body["issue"]:
return {}