• 
      

    Create a standard definition and modernize the hook for approval.

    Review Request #15310 — Created Sept. 15, 2026 and updated — Latest diff uploaded

    Information

    Review Board
    release-9.x

    Reviewers

    Review request approval has historically been represented on
    ReviewRequest via a couple of properties (approval and
    approval_failure), and by hooks as a tuple or a boolean.

    This change moves to a new central definition, ReviewRequestApproval.
    This is a typed dictionary that contains a required approval flag and
    an optional reason. Reasons can now be given whether approved or not,
    allowing for more advanced feedback.

    ReviewRequest.get_approval() returns a ReviewRequestApproval, and
    the old properties wrap this.

    ReviewRequestApprovalHook.is_approved() is soft-deprecated. No
    official deprecations at this time, but it has been replaced with a new
    get_approval() (which wraps the legacy method if not overridden)
    that's better suited for how approval will soon be used.

    All unit tests pass.

    Built the new hook docs and checked for links and build errors.

    Commits

    Files