Make it clearer that the Push resource classes use the CLI
The following discussion from gitlab-ce!32689 should be addressed:
-
@wlsf82 started a discussion: (+6 comments) If this fabrication happens through git using the CLI, I think we should have a
fabricate_via_cli
abstraction, so that we could easily differentiate all kind of fabrications by reading the code. Of course, this can be in a different MR, but I'd like to hear your thoughts about it.
I said:
That gets a little complicated.
Repository::Push
usesGit::Repository
, which does use the CLI as you noted. ButProjectPush
also creates a project via the API, so it's not strictly fabricating via the API.
We agreed on
changing the class name to
PushCLI
(andProjectPushCLI
)? That way the fabricate methods stay the same (so we know the project fabrication still happens via the API or browser UI if we choose), but the push uses the CLI.