Jump to >

reviewboard.reviews.default_actions

class CloseMenuAction(child_actions=None)[source]

Bases: reviewboard.reviews.actions.BaseReviewRequestMenuAction

A menu action for closing the corresponding review request.

action_id = 'close-review-request-action'[source]

The ID of this action. Must be unique across all types of actions and menu actions, at any depth.

label = 'Close'[source]

The label that displays this action to the user.

should_render(context)[source]

Return whether the action should render.

Parameters

context (dict) – The current render context.

Returns

Whether the action should render.

Return type

bool

__annotations__ = {}
class SubmitAction[source]

Bases: reviewboard.reviews.actions.BaseReviewRequestAction

An action for submitting the review request.

action_id = 'submit-review-request-action'[source]

The ID of this action. Must be unique across all types of actions and menu actions, at any depth.

label = 'Submitted'[source]

The label that displays this action to the user.

should_render(context)[source]

Return whether the action should render.

Parameters

context (dict) – The current render context.

Returns

Whether the action should render.

Return type

bool

__annotations__ = {}
class DiscardAction[source]

Bases: reviewboard.reviews.actions.BaseReviewRequestAction

An action for discarding the review request.

action_id = 'discard-review-request-action'[source]

The ID of this action. Must be unique across all types of actions and menu actions, at any depth.

label = 'Discarded'[source]

The label that displays this action to the user.

__annotations__ = {}
class DeleteAction[source]

Bases: reviewboard.reviews.actions.BaseReviewRequestAction

An action for permanently deleting the review request.

action_id = 'delete-review-request-action'[source]

The ID of this action. Must be unique across all types of actions and menu actions, at any depth.

label = 'Delete Permanently'[source]

The label that displays this action to the user.

should_render(context)[source]

Return whether the action should render.

Parameters

context (dict) – The current render context.

Returns

Whether the action should render.

Return type

bool

__annotations__ = {}
class UpdateMenuAction(child_actions=None)[source]

Bases: reviewboard.reviews.actions.BaseReviewRequestMenuAction

A menu action for updating the corresponding review request.

action_id = 'update-review-request-action'[source]

The ID of this action. Must be unique across all types of actions and menu actions, at any depth.

label = 'Update'[source]

The label that displays this action to the user.

should_render(context)[source]

Return whether the action should render.

Parameters

context (dict) – The current render context.

Returns

Whether the action should render.

Return type

bool

__annotations__ = {}
class UploadDiffAction[source]

Bases: reviewboard.reviews.actions.BaseReviewRequestAction

An action for updating/uploading a diff for the review request.

action_id = 'upload-diff-action'[source]

The ID of this action. Must be unique across all types of actions and menu actions, at any depth.

get_label(context)[source]

Return this action’s label.

The label will change depending on whether or not the corresponding review request already has a diff.

Parameters

context (django.template.Context) – The collection of key-value pairs from the template.

Returns

The label that displays this action to the user.

Return type

unicode

should_render(context)[source]

Return whether or not this action should render.

If the corresponding review request has a repository, then an upload diff form exists, so we should render this UploadDiffAction.

Parameters

context (django.template.Context) – The collection of key-value pairs available in the template just before this action is to be rendered.

Returns

Determines if this action should render.

Return type

bool

__annotations__ = {}
class UploadFileAction[source]

Bases: reviewboard.reviews.actions.BaseReviewRequestAction

An action for uploading a file for the review request.

action_id = 'upload-file-action'[source]

The ID of this action. Must be unique across all types of actions and menu actions, at any depth.

label = 'Add File'[source]

The label that displays this action to the user.

__annotations__ = {}
class DownloadDiffAction[source]

Bases: reviewboard.reviews.actions.BaseReviewRequestAction

An action for downloading a diff from the review request.

action_id = 'download-diff-action'[source]

The ID of this action. Must be unique across all types of actions and menu actions, at any depth.

label = 'Download Diff'[source]

The label that displays this action to the user.

get_url(context)[source]

Return this action’s URL.

Parameters

context (django.template.Context) – The collection of key-value pairs from the template.

Returns

The URL to invoke if this action is clicked.

Return type

unicode

get_hidden(context)[source]

Return whether this action should be initially hidden to the user.

Parameters

context (django.template.Context) – The collection of key-value pairs from the template.

Returns

Whether this action should be initially hidden to the user.

Return type

bool

should_render(context)[source]

Return whether or not this action should render.

Parameters

context (django.template.Context) – The collection of key-value pairs available in the template just before this action is to be rendered.

Returns

Determines if this action should render.

Return type

bool

__annotations__ = {}
class EditReviewAction[source]

Bases: reviewboard.reviews.actions.BaseReviewRequestAction

An action for editing a review intended for the review request.

action_id = 'review-action'[source]

The ID of this action. Must be unique across all types of actions and menu actions, at any depth.

label = 'Review'[source]

The label that displays this action to the user.

should_render(context)[source]

Return whether the action should render.

Parameters

context (dict) – The current render context.

Returns

Whether the action should render.

Return type

bool

__annotations__ = {}
class AddGeneralCommentAction[source]

Bases: reviewboard.reviews.actions.BaseReviewRequestAction

An action for adding a new general comment to a review.

action_id = 'general-comment-action'[source]

The ID of this action. Must be unique across all types of actions and menu actions, at any depth.

label = 'Add General Comment'[source]

The label that displays this action to the user.

should_render(context)[source]

Return whether the action should render.

Parameters

context (dict) – The current render context.

Returns

Whether the action should render.

Return type

bool

__annotations__ = {}
class ShipItAction[source]

Bases: reviewboard.reviews.actions.BaseReviewRequestAction

An action for quickly approving the review request without comments.

action_id = 'ship-it-action'[source]

The ID of this action. Must be unique across all types of actions and menu actions, at any depth.

label = 'Ship It!'[source]

The label that displays this action to the user.

should_render(context)[source]

Return whether the action should render.

Parameters

context (dict) – The current render context.

Returns

Whether the action should render.

Return type

bool

__annotations__ = {}
get_default_actions()[source]

Return a copy of all the default actions.

Returns

A copy of all the default actions.

Return type

list of BaseReviewRequestAction