Jump to >

reviewboard.reviews.context

comment_counts(user, all_comments, filediff, interfilediff=None)[source]

Returns an array of current comments for a filediff, sorted by line number.

Each entry in the array has a dictionary containing the following keys:

Key Description
comment_id The ID of the comment
text The plain or rich text of the comment
rich_text The rich text flag for the comment
line The first line number
num_lines The number of lines this comment spans
user A dictionary containing “username” and “name” keys for the user
url The URL to the comment
localdraft True if this is the current user’s draft comment
review_id The ID of the review this comment is associated with
make_review_request_context(request, review_request, extra_context={}, is_diff_view=False)[source]

Returns a dictionary for template contexts used for review requests.

The dictionary will contain the common data that is used for all review request-related pages (the review request detail page, the diff viewer, and the screenshot pages).

For convenience, extra data can be passed to this dictionary.

has_comments_in_diffsets_excluding(review, diffset_pair)[source]

Returns whether the specified review has “other comments”.

This is used to notify users that their review has comments on diff revisions other than the one that they happen to be looking at at any given moment.

diffsets_with_comments(review, current_pair)[source]

Returns a list of diffsets in the review that contain draft comments.

interdiffs_with_comments(review, current_pair)[source]

Get a list of interdiffs in the review that contain draft comments.