Create a standard definition and modernize the hook for approval.
Review Request #15310 — Created Sept. 15, 2026 and updated — Latest diff uploaded
Review request approval has historically been represented on
ReviewRequestvia a couple of properties (approvaland
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 requiredapprovalflag and
an optionalreason. Reasons can now be given whether approved or not,
allowing for more advanced feedback.
ReviewRequest.get_approval()returns aReviewRequestApproval, 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.