Allow hiding of some hosting services and SCMs during repository config.

Review Request #10879 — Created Feb. 3, 2020 and submitted

chipx86
Review Board
release-3.0.x
reviewboard

This introduces new attributes to HostingService to completely hide a
hosting service from configuration or to hide specific supported SCMs.
This is done to keep some level of support enabled in Review Board for
hosting service configuration or their SCMs that may no longer be
supported by the service itself.

If configuring an instance that is using an otherwise-hidden hosting
service or SCM, it will continue to be shown during repository
configuration. This ensures that loading a repository doesn't result in
us showing incorrect information.

To mark a HostingService as hidden, simply set visible = False on
the class.

To mark SCMs on a HostingService as hidden, the visible_scmtools
attribute needs to be set to a list of all the visible SCMTool
IDs/names. If this is not set (None is the default), then any code
that accesses it will need to fall back on supported_scmtools (this is
because we would need a class-level property, which we can't do at this
time).

Unit tests passed.

Tested creating and editing repositories with visible HostingServices.

Tested setting some services and SCMs on a service as hidden and verifying
that they didn't show up by default. Then tested by editing repositories
that were using those and verified that they were showing up and could be
saved.

Summary
Allow hidding of some hosting services and SCMs during repository config.
Description From Last Updated

Typo in summary: hidding -> hiding

daviddavid
david
  1. 
      
  2. Typo in summary: hidding -> hiding

  3. 
      
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (a775605)
Loading...