Create a new extension hook for hiding built-in actions.

Review Request #12963 — Created April 20, 2023 and submitted

Information

Review Board
release-6.x

Reviewers

One thing extensions authors like to do on occasion is either hide or
replace built-in functionality. For example, some servers have disabled
the support menu or replaced the quick ship-it action with one that does
some custom behavior first. This change adds an official extension hook
to enable this without having to patch the code.

  • Ran unit tests.
  • Verified correctness of behavior with a small extension that hid the
    support menu and ship-it action.
  • Built docs and checked the output.
Summary ID
Create a new extension hook for hiding built-in actions.
One thing extensions authors like to do on occasion is either hide or replace built-in functionality. For example, some servers have disabled the support menu or replaced the quick ship-it action with one that does some custom behavior first. This change adds an official extension hook to enable this without having to patch the code. Testing Done: - Ran unit tests. - Verified correctness of behavior with a small extension that hid the support menu and ship-it action. - Built docs and checked the output.
082b53f6ee88ea92131a8f090728196a36124312
Description From Last Updated

local variable 'hook' is assigned to but never used Column: 9 Error code: F841

reviewbotreviewbot

I know this is pretty self explanatory but I think it'd still be good to say something like "Simply initialize …

maubinmaubin

Missing the rest of the sentence here.

maubinmaubin
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

david
maubin
  1. 
      
  2. Show all issues

    I know this is pretty self explanatory but I think it'd still be good to say something like "Simply initialize the hook with a list of :py:attr:~reviewboard.actions.base.BaseAction.action_ids of the actions that you want to hide."

  3. reviewboard/actions/base.py (Diff revision 2)
     
     
    Show all issues

    Missing the rest of the sentence here.

  4. 
      
david
maubin
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-6.x (77e15b5)