[Backport from EE] Refactors GitPushService spec code
What does this MR do?
Backports the refactor made by https://gitlab.com/gitlab-org/gitlab-ee/commit/c54e08cf7509caad05d9a076e3a5172b82207437 (as part of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1616) to CE.
Are there points in the code the reviewer needs to double check?
As long as spec pass it's fine to merge.
Why was this MR needed?
prevent Merge Conflicts with the backporting of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2477
Edited by Gabriel Mazetto