Centralize the Conditions fields and enable extensible condition support.
Review Request #14281 — Created Jan. 1, 2025 and updated
Every integration defined its own
ConditionsField
with its own label,
providing aReviewRequestConditionChoices
class. Paired with design
flaws in Djblets and Review Board with extensible conditions, this meant
that there was no way to show any condition choices registered with any
central registry.Review Board is gaining a centralized
ReviewRequestConditionsField
and a central registry that reflects any choices provided by extensions.
This change makes use of that, providing a compatibility class for older
versions of Review Board that behaves as before.All
ConditionsField
instances have been updated to utilize the new
standard field.The Travis-CI support had a special requirement where only GitHub
repositories were shown. To make this work, we now provide a specialized
registry that's instantiated only when the field is ready to be used. It
wraps the main registry and replaces repository-related condition choices
with ones that are limited to GitHub repositories.
Tested with Review Board 7.0.2 and 7.1 (with the new registry support
for condition choices). Verified that on 7.1, extension-provided choices
appeared in the list and were matched.Tested that the Travis-CI support only included GitHub repositories.
Summary | ID |
---|---|
f5c178336be3de6d81e7596e7d6ff852adcda5e3 |