go-githubapp
go-githubapp copied to clipboard
Turn received webhook event to Debug
This is a possible resolution to #394. We're running a github app with this framework for 400+ repos, and the amount of logs we get for all of the webhook events we subscribe to is very noisy. When we get an event we do a bunch of filtering on things like event.GetAction() to only respond to events we care about. Allowing users to log on the messages that they want to process seems like a less noisy approach, with the option to turn on Trace logging and see every event that comes in.
Here's an example of some noisy event received logs before our own more tailored logs for the actions we care about:
12:53PM INF Received webhook event github_delivery_id=c5bf3530-8cb0-11ef-8e88-a7cddd8e0076 github_event_type=pull_request service=figure-validator
12:54PM INF Received webhook event github_delivery_id=cc155ea0-8cb0-11ef-848b-c9a3178cb0b2 github_event_type=pull_request service=figure-validator
12:54PM INF Received webhook event github_delivery_id=cbc19950-8cb0-11ef-8449-9a14a93e08b1 github_event_type=pull_request service=figure-validator
12:54PM INF pull_request event being handled: opened github_delivery_id=cbc19950-8cb0-11ef-8449-9a14a93e08b1 github_event_type=pull_request service=figure-validator
Fixes #394