Update the Repository API resource to use RepositoryForm for operations.

Review Request #10377 — Created Jan. 8, 2019 and submitted — Latest diff uploaded

chipx86
Review Board
release-3.0.x
84ac54c...
reviewboard

The Repository API has always been pretty limited, simply wrapping the
creation or editing of a Repository model 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.

Loading...