Repositories use their associated HostingServiceAccount
to fetch hosting
services. The hosting service account will return None
if a hosting service
fails to load. This isn't the greatest thing to do since this hides the fact
that the service didn't load, and instead makes the repository behave as if
they do not have a hosting service configured.
This change instead raises an error when a HostingServiceAccount
fails to
load a service. This way, a more appropriate and helpful eror message is shown
when, for example, trying to post changes or view diffs linked to repositories
that use a hosting service that can't be loaded.
This also adds some help texts to the HostingServiceAccount
's fields. This
was primarily done to clarify that the service_name
field should be set to
the hosting service ID rather than the hosting service name. This assumption
is made everywhere in the code except for in one test file which sets the
field to a hosting service name, which we correct in this change.