Add template hooks to email (html and text)

Review Request #8587 — Created Jan. 2, 2017 and submitted

Information

Review Board
master
7eb88e9...

Reviewers

The two new hooks (one for html and one for text) can be used to add similar
information as what can be added to the review request pages using the
review-summary-header-pre/post template hooks.

The template hook requires the Django request object so that is now passed in
the review_published signal.

Tested using an extension with template hooks for the new hooks. The hooks succesfully added information from the review extra_data field to the mail (both text and html).

Description From Last Updated

'formataddr' imported but unused

reviewbotreviewbot

We should call this request, just to be consistent throughout the codebase.

daviddavid

http_request -> request

daviddavid

Needs a trailing comma.

daviddavid

http_request -> request.

daviddavid

http_request -> request. Maybe also rewrap this so providing_args=[...] is on its own line, indented 4 spaces?

daviddavid
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/notifications/email.py
        reviewboard/webapi/resources/base_review.py
        reviewboard/reviews/models/review.py
        reviewboard/reviews/signals.py
    
    Ignored Files:
        reviewboard/templates/notifications/review_email.txt
        reviewboard/templates/notifications/review_email.html
        docs/manual/extending/extensions/hooks/template-hook.rst
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/notifications/email.py
        reviewboard/webapi/resources/base_review.py
        reviewboard/reviews/models/review.py
        reviewboard/reviews/signals.py
    
    Ignored Files:
        reviewboard/templates/notifications/review_email.txt
        reviewboard/templates/notifications/review_email.html
        docs/manual/extending/extensions/hooks/template-hook.rst
    
    
  2. reviewboard/notifications/email.py (Diff revision 1)
     
     
    Show all issues
     'formataddr' imported but unused
    
  3. 
      
erijo
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/notifications/email.py
        reviewboard/webapi/resources/base_review.py
        reviewboard/reviews/models/review.py
        reviewboard/reviews/signals.py
    
    Ignored Files:
        reviewboard/templates/notifications/review_email.txt
        reviewboard/templates/notifications/review_email.html
        docs/manual/extending/extensions/hooks/template-hook.rst
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/notifications/email.py
        reviewboard/webapi/resources/base_review.py
        reviewboard/reviews/models/review.py
        reviewboard/reviews/signals.py
    
    Ignored Files:
        reviewboard/templates/notifications/review_email.txt
        reviewboard/templates/notifications/review_email.html
        docs/manual/extending/extensions/hooks/template-hook.rst
    
    
  2. 
      
david
  1. 
      
  2. reviewboard/notifications/email.py (Diff revision 2)
     
     
    Show all issues

    We should call this request, just to be consistent throughout the codebase.

  3. reviewboard/notifications/email.py (Diff revision 2)
     
     
    Show all issues

    http_request -> request

  4. reviewboard/notifications/email.py (Diff revision 2)
     
     
    Show all issues

    Needs a trailing comma.

  5. reviewboard/reviews/models/review.py (Diff revision 2)
     
     
    Show all issues

    http_request -> request.

  6. reviewboard/reviews/signals.py (Diff revision 2)
     
     
    Show all issues

    http_request -> request. Maybe also rewrap this so providing_args=[...] is on its own line, indented 4 spaces?

  7. 
      
erijo
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/notifications/email.py
        reviewboard/webapi/resources/base_review.py
        reviewboard/reviews/models/review.py
        reviewboard/reviews/signals.py
    
    Ignored Files:
        reviewboard/templates/notifications/review_email.txt
        reviewboard/templates/notifications/review_email.html
        docs/manual/extending/extensions/hooks/template-hook.rst
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/notifications/email.py
        reviewboard/webapi/resources/base_review.py
        reviewboard/reviews/models/review.py
        reviewboard/reviews/signals.py
    
    Ignored Files:
        reviewboard/templates/notifications/review_email.txt
        reviewboard/templates/notifications/review_email.html
        docs/manual/extending/extensions/hooks/template-hook.rst
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
  1. 
      
  2. 
      
erijo
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (d42af35)