forcedotcom / git2gus

A Github application to keep issues in sync with Agile Accelerator
https://lwc-gus-bot.herokuapp.com
BSD 3-Clause "New" or "Revised" License
27 stars 16 forks source link

Shorten loggerMiddleware logs #160

Open mpsenn opened 1 year ago

mpsenn commented 1 year ago

The logger in loggerMiddleware.js logs very long log lines, since it logs the entire POST body of a github webhook, which can be upwards of 30,000 characters. This leads to the log being split over multiple lines and unable to being parsed as json.

It'd be great to filter the POST body before logging, and only including important stuff, like the x-github- headers, info about the repository and event. There are a ton of URLs that could be filtered out. The PR title is great to log, but not the whole PR description.