Adding rb-gateway webhook and template for registering webhooks

Review Request #9700 — Created Feb. 24, 2018 and updated

floriecai
Review Board
master
7ee90ab...
reviewboard, students

Task 3 for Rb-Gateway Webhooks feature: Adding webhook receivers in Review Board to close review requests when commits are posted.

Added html template for adding webhooks. Pretty much a copy-pate of github.py with some tweaks for rb-gateway-specific headers.

Along with r/9585, the webhook successfully returns and closes the review request.


Description From Last Updated

E231 missing whitespace after ','

reviewbotreviewbot

E501 line too long (88 > 79 characters)

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W291 trailing whitespace

reviewbotreviewbot

E501 line too long (83 > 79 characters)

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

F841 local variable 'plan' is assigned to but never used

reviewbotreviewbot

E501 line too long (82 > 79 characters)

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W391 blank line at end of file

reviewbotreviewbot

F401 'reviewboard.hostingsvcs.hook_utils.get_git_branch_name' imported but unused

reviewbotreviewbot

E501 line too long (81 > 79 characters)

reviewbotreviewbot

E501 line too long (81 > 79 characters)

reviewbotreviewbot

E225 missing whitespace around operator

reviewbotreviewbot

E501 line too long (83 > 79 characters)

reviewbotreviewbot

E303 too many blank lines (2)

reviewbotreviewbot

F401 'reviewboard.hostingsvcs.hook_utils.get_git_branch_name' imported but unused

reviewbotreviewbot

E501 line too long (81 > 79 characters)

reviewbotreviewbot

E501 line too long (83 > 79 characters)

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

W293 blank line contains whitespace

reviewbotreviewbot

These should be grouped with the other django imports

daviddavid

This should come after the hostingsvcs.forms imports (alphabetical order)

daviddavid

Add a period at the end of the docstring.

daviddavid

There's an extra space between the """ and the start of the docstring. This also needs a period at the …

daviddavid

This blank line can be removed.

daviddavid

You can make a bystring with b'ABC123'. But what is ABC123?

daviddavid

This blank line can go away.

daviddavid

Docstrings should be in the imperative mood instead of passive ("Return" instead of "Returns"). This also needs Args and Returns …

daviddavid

There's an extra space character an the end of this line.

daviddavid

Can you indent the HTML 1 space instead of 8?

daviddavid

Please wrap to 80 columns and add a period at the end.

daviddavid

Perhaps this value could be stored in a constant somewhere?

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

flake8

FL
Review request changed

Change Summary:

Working version of get_hook_instructions, and have webhook close review request

Commit:

-305167c5c50b3c429167e35b6f2963fbe86ba662
+e54087e8b727cf83c3a12621cf3dd1ae96f6a785

Diff:

Revision 2 (+233)

Show changes

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

FL
Review request changed

Commit:

-e54087e8b727cf83c3a12621cf3dd1ae96f6a785
+7287d53545cdb0cdf568d24b06171abc85a3c186

Diff:

Revision 3 (+197)

Show changes

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

FL
Review request changed

Commit:

-7287d53545cdb0cdf568d24b06171abc85a3c186
+120488d5af2e65affcd23c699ef1a6a8cd9b6e62

Diff:

Revision 4 (+196)

Show changes

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

FL
FL
david
  1. 
      
  2. reviewboard/hostingsvcs/rbgateway.py (Diff revision 5)
     
     
     

    These should be grouped with the other django imports

  3. reviewboard/hostingsvcs/rbgateway.py (Diff revision 5)
     
     

    This should come after the hostingsvcs.forms imports (alphabetical order)

  4. reviewboard/hostingsvcs/rbgateway.py (Diff revision 5)
     
     

    Add a period at the end of the docstring.

  5. reviewboard/hostingsvcs/rbgateway.py (Diff revision 5)
     
     

    There's an extra space between the """ and the start of the docstring. This also needs a period at the end.

  6. reviewboard/hostingsvcs/rbgateway.py (Diff revision 5)
     
     

    This blank line can be removed.

  7. reviewboard/hostingsvcs/rbgateway.py (Diff revision 5)
     
     

    You can make a bystring with b'ABC123'. But what is ABC123?

    1. It just an example secret associated with rb-gateway.

  8. reviewboard/hostingsvcs/rbgateway.py (Diff revision 5)
     
     

    This blank line can go away.

  9. reviewboard/hostingsvcs/rbgateway.py (Diff revision 5)
     
     

    Docstrings should be in the imperative mood instead of passive ("Return" instead of "Returns"). This also needs Args and Returns sections.

  10. There's an extra space character an the end of this line.

  11. reviewboard/templates/hostingsvcs/rbgateway/repo_hook_instructions.html (Diff revision 5)
     
     
     
     
     
     
     
     
     
     
     

    Can you indent the HTML 1 space instead of 8?

  12. Please wrap to 80 columns and add a period at the end.

  13. 
      
FL
Review request changed

Commit:

-1eccb2f0ca98f3251521a72d90d05ec9b60f9dea
+7ee90ab2137fb6f4428c049819e2a53e0ea36d01

Diff:

Revision 6 (+195 -1)

Show changes

Checks run (2 timed out)

flake8 timed out.
JSHint timed out.
jshephard
  1. 
      
  2. reviewboard/hostingsvcs/rbgateway.py (Diff revision 6)
     
     

    Perhaps this value could be stored in a constant somewhere?

  3. 
      
Loading...