• 
      

    Add the GitHubAppWebhookHandlerHook extension hook.

    Review Request #15338 — Created Sept. 24, 2026 and updated

    Information

    Review Board
    release-9.x

    Reviewers

    This adds an extension hook for registering GitHub App webhook handlers,
    letting extensions act on GitHub events delivered to Review Board, like
    pull requests being opened on a repository.

    • Ran unit tests.
    • Used in the Pull Request integration work.
    • Built the docs and viewed.
    Summary ID
    Add the GitHubAppWebhookHandlerHook extension hook.
    This adds an extension hook for registering GitHub App webhook handlers, letting extensions act on GitHub events delivered to Review Board, like pull requests being opened on a repository.
    38345376acfed4c1ec695cfe81222e0ed6ef880b
    Description From Last Updated

    This reads like it was supposed to be .. todo::, which would show up in content. A regular rst comment …

    david david

    Same here.

    david david

    If we're using this, we should also include from __future__ import annotations in the example, otherwise any Python version less …

    david david

    Missing a trailing comma.

    david david

    Can we prefix this name with an underscore (so pytest doesn't get annoyed trying to collect it), and add a …

    david david

    I don't think there's any reason for this to use GitHubTestCase, and it's pulling in setup work for no good …

    david david

    We should probably use assertIs instead of assertEqual

    david david

    Everywhere else we've tried to be careful to capitalize this "WebHook". We should do that throughout here, and also in …

    david david

    This suggests that all 5 attributes are required, but only two are. Can we do: You must set the following: …

    david david

    installation_account can also be None

    david david

    Needs a trailing comma.

    david david
    david
    1. 
        
    2. Show all issues

      This reads like it was supposed to be .. todo::, which would show up in content. A regular rst comment with "TODO" might be better, as opposed to something that looks like a typoed directive.

    3. Show all issues

      Same here.

    4. Show all issues

      If we're using this, we should also include from __future__ import annotations in the example, otherwise any Python version less than 3.14 will get a NameError

    5. Show all issues

      Missing a trailing comma.

    6. Show all issues

      Can we prefix this name with an underscore (so pytest doesn't get annoyed trying to collect it), and add a docstring?

    7. Show all issues

      I don't think there's any reason for this to use GitHubTestCase, and it's pulling in setup work for no good reason. BaseExtensionHookTestCase is a better base class to use.

    8. Show all issues

      We should probably use assertIs instead of assertEqual

    9. 
        
    maubin
    david
    1. 
        
    2. Show all issues

      Everywhere else we've tried to be careful to capitalize this "WebHook". We should do that throughout here, and also in GitHubAppWebHookHandlerHook

      1. I'll do this in a separate change and update the other new webhook things that were added in 9.0 that use Webhook instead of WebHook.

    3. docs/manual/extending/extensions/hooks/github-app-webhook-handler-hook.rst (Diff revision 2)
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
      Show all issues

      This suggests that all 5 attributes are required, but only two are. Can we do:

      You must set the following:
      
      * :py:attr:`~BaseGitHubAppWebhookHandler.handler_id`: ...
      * :py:attr:`~BaseGitHubAppWebhookHandler.events`: ...
      
      You can optionally set the following:
      
      * ...
      
      1. While we don't validate them as required when registering the class, I do want to instruct extension authors to explicitly set all these attributes so its clear what's required by the handler. I'll update the docs to be more clear about when its ok to leave some of these as blank.

    4. Show all issues

      installation_account can also be None

    5. Show all issues

      Needs a trailing comma.

    6. 
        
    maubin
    Review request changed
    Commits:
    Summary ID
    Add the GitHubAppWebhookHandlerHook extension hook.
    This adds an extension hook for registering GitHub App webhook handlers, letting extensions act on GitHub events delivered to Review Board, like pull requests being opened on a repository.
    58235ea61b420a519e3b658f43958657288b04ff
    Add the GitHubAppWebhookHandlerHook extension hook.
    This adds an extension hook for registering GitHub App webhook handlers, letting extensions act on GitHub events delivered to Review Board, like pull requests being opened on a repository.
    38345376acfed4c1ec695cfe81222e0ed6ef880b

    Checks run (2 succeeded)

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