Update the Repository API resource to use RepositoryForm for operations.
Review Request #10377 — Created Jan. 8, 2019 and submitted — Latest diff uploaded
The Repository API has always been pretty limited, simply wrapping the
creation or editing of a
Repositorymodel instance. This meant that we
had no good way of supporting modern features like hosting services, and
we had to duplicate a lot of complicated logic and error checking.
This change updates the API to simply wrap
RepositoryForm. This gives
us all the checking and capabilities of the form, and keeps the API's
code very small.
Right now, we still don't support anything advanced, like hosting
services, but that can now more easily come in future updates by simply
enabling the appropriate request fields in the API.
Unit tests pass.