This change fixes production app credentials and also removes the race condition on app installation. As GitHub redirects immediately on app installation, regardless of whether or not the webhook event has been sent & handled, we were handling this installation in 2 places. As a result, in some cases, there was a race condition for writing to the database. This instead only handles the webhook and the redirect waits for an installation to be present.
This change fixes production app credentials and also removes the race condition on app installation. As GitHub redirects immediately on app installation, regardless of whether or not the webhook event has been sent & handled, we were handling this installation in 2 places. As a result, in some cases, there was a race condition for writing to the database. This instead only handles the webhook and the redirect waits for an installation to be present.