Code4GovTech / server

0 stars 4 forks source link

Update pullRequestEventHandler.py #64

Open Durgesh4993 opened 6 months ago

Durgesh4993 commented 6 months ago

Issue #63

# Example usage:
event_data = {
    "action": "closed",
    "merged": True,
    "pull_request": {
        "title": "Example PR Title"
    }
}

handler = PrEventHandler()
handler.handleEvent(event_data)

This would print "PR Merged: Example PR Title" to the console. You can similarly handle other types of events by providing appropriate event data to the handleEvent method.