def lambda_handler()

in src/get_ticket/app.py [0:0]


def lambda_handler(event, context):
    
    print(event)
    
    ticket_id = event['id']
    
    if  event['detail-type'] == "Support Ticket: Comment Created":
        
        if event['content']['comment']['author']['is_staff'] == False:
            
            comment = event['content']['comment']['body']
        
            print("ticket_id: {}".format(ticket_id))
            print("comment: {}".format(comment))
        
            return {
                
                'ticket_id': ticket_id,
                'comment': comment
            }