webhooks: Move the extra logging information into a formatter.

This clears it out of the data sent to Sentry, where it is duplicative
with the indexed metadata -- and potentially exposes PHI if Sentry's
"make this issue public" feature is used.
This commit is contained in:
Alex Vandiver
2020-09-03 18:38:24 -07:00
committed by Tim Abbott
parent b8a2e6b5f8
commit 3f6e4ff303
6 changed files with 69 additions and 153 deletions

View File

@@ -461,9 +461,8 @@ A temporary team so that I can get some webhook fixtures!
msg = m.call_args[0][0]
stack_info = m.call_args[1]["stack_info"]
self.assertIn("content_type: application/json", msg)
self.assertIn(
"summary: The 'team/edited (changes: bogus_key1/bogus_key2)' event isn't currently supported by the GitHub webhook",
"The 'team/edited (changes: bogus_key1/bogus_key2)' event isn't currently supported by the GitHub webhook",
msg,
)
self.assertTrue(stack_info)