[BE] Trigger record creation for code analytics on new commit
Discovery Issue: https://gitlab.com/gitlab-org/gitlab-ee/issues/12683
Some discussion here on the discovery issue: https://gitlab.com/gitlab-org/gitlab-ee/issues/12683#note_201702233
We need to create new records for code analytics table for each new commit. This can either be done on push through a hook (maybe in gitaly?) or as a background job (some delay is fine, even upto 24h).
The implementation still needs more planning and looking into gitaly. Not sure if there is another place to add the hook.