Rework the ReviewRequestApprovalHook docs for better flow and guidance.

Review Request #14757 — Created Jan. 1, 2026 and updated

Information

Review Board
release-7.1.x

Reviewers

The ReviewRequestApprovalHook docs were pretty old and did little to
communicate the expectations of the hook. The very first sentence said
these were new in Review Board 2.0.

This change reworks the docs to clearly describe what approval state is
for and where it's used, the execution and chaining model of these
hooks, the signature of is_approved() methods, examples, and best
practices.

Typing and docs for the affected codepaths have been updated as well to
reflect what's shown in the guide and to link back to it.

Built the docs and checked the references/links on all affected code.

Ran content through ChatGPT for analysis and suggestions.

Summary ID
Rework the ReviewRequestApprovalHook docs for better flow and guidance.
The `ReviewRequestApprovalHook` docs were pretty old and did little to communicate the expectations of the hook. The very first sentence said these were new in Review Board 2.0. This change reworks the docs to clearly describe what approval state is for and where it's used, the execution and chaining model of these hooks, the signature of `is_approved()` methods, examples, and best practices. Typing and docs for the affected codepaths have been updated as well to reflect what's shown in the guide and to link back to it.
b54c07f84ae72a7a9f244a934b4d621c96577894
Description From Last Updated

This reads a little bit awkward. The review request isn't a user, the review request author (or submitter) is a …

daviddavid

Based on the docstring, this should be bool | tuple[bool, str | None] (str -> bool)

daviddavid

Here we could add "... pre-receive hooks (for example git-hook-check-approval)"

maubinmaubin

Can we link to relevant docs for any of these items?

maubinmaubin

This seems slightly more indented than it should be.

daviddavid
david
  1. 
      
  2. Show all issues

    This reads a little bit awkward. The review request isn't a user, the review request author (or submitter) is a user.

  3. Show all issues

    Based on the docstring, this should be bool | tuple[bool, str | None] (str -> bool)

  4. 
      
chipx86
david
  1. Ship It!
  2. 
      
maubin
  1. 
      
  2. Show all issues

    Can we link to relevant docs for any of these items?

    1. I don't know that we have anything other than extensions and integrations. I'll link those, and if I'm missing something, let me know.

  3. 
      
chipx86
maubin
  1. 
      
  2. Show all issues

    Here we could add "... pre-receive hooks (for example git-hook-check-approval)"

  3. 
      
david
  1. 
      
  2. Show all issues

    This seems slightly more indented than it should be.

  3. 
      
chipx86
Review request changed
Change Summary:
  • Added a link to the RBTools hooks.
  • Reduced indentation of an example.
Commits:
Summary ID
Rework the ReviewRequestApprovalHook docs for better flow and guidance.
The `ReviewRequestApprovalHook` docs were pretty old and did little to communicate the expectations of the hook. The very first sentence said these were new in Review Board 2.0. This change reworks the docs to clearly describe what approval state is for and where it's used, the execution and chaining model of these hooks, the signature of `is_approved()` methods, examples, and best practices. Typing and docs for the affected codepaths have been updated as well to reflect what's shown in the guide and to link back to it.
8b0ae7ee71e872a72f6bd6a9281c1bf1ceb20eb6
Rework the ReviewRequestApprovalHook docs for better flow and guidance.
The `ReviewRequestApprovalHook` docs were pretty old and did little to communicate the expectations of the hook. The very first sentence said these were new in Review Board 2.0. This change reworks the docs to clearly describe what approval state is for and where it's used, the execution and chaining model of these hooks, the signature of `is_approved()` methods, examples, and best practices. Typing and docs for the affected codepaths have been updated as well to reflect what's shown in the guide and to link back to it.
b54c07f84ae72a7a9f244a934b4d621c96577894

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
maubin
  1. Ship It!
  2.