• 
      

    Centralize the Conditions fields and enable extensible condition support.

    Review Request #14281 — Created Jan. 2, 2025 and submitted — Latest diff uploaded

    Information

    rbintegrations
    release-4.x

    Reviewers

    Every integration defined its own ConditionsField with its own label,
    providing a ReviewRequestConditionChoices 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.

    Commits

    Files