rbtools.commands.review¶
Implementation of rbt review.
New in version 3.0.
Classes
|
Base class for comment subcommands. |
|
Subcommand to add a diff comment to a draft review. |
|
Subcommand to add a file attachment comment to a review draft. |
|
Subcommand to add a general comment to a review draft. |
|
Subcommand to discard a draft review. |
|
Subcommand to create or edit draft reviews. |
|
Subcommand for publishing a review draft. |
|
RBTools command to create and publish reviews. |
|
A subcommand for review actions. |
- class rbtools.commands.review.ReviewSubCommand(options, config, *args, **kwargs)[source]¶
Bases:
BaseSubCommand
A subcommand for review actions.
- needs_api = True[source]¶
Whether the command needs the API client.
If this is set, the initialization of the command will set
api_client
andapi_root
.New in version 3.0.
- Type:
- class rbtools.commands.review.AddCommentSubCommand(options, config, *args, **kwargs)[source]¶
Bases:
ReviewSubCommand
Base class for comment subcommands.
- option_list = [<rbtools.commands.OptionGroup object>][source]¶
Command-line options for this command.
- Type:
list
ofOption
orOptionGroup
- add_comment(text_type)[source]¶
Create the comment.
- Parameters:
text_type (
unicode
) – The text type to use.- Raises:
rbtools.api.errors.APIError – An error occurred while performing API requests.
- class rbtools.commands.review.AddDiffComment(options, config, *args, **kwargs)[source]¶
Bases:
AddCommentSubCommand
Subcommand to add a diff comment to a draft review.
- help_text = 'Add a comment to a diff as part of a draft review.'[source]¶
The subcommand’s help text.
- Type:
- option_list = [<rbtools.commands.OptionGroup object>, <rbtools.commands.OptionGroup object>][source]¶
Command-line options for this command.
- Type:
list
ofOption
orOptionGroup
- add_comment(text_type)[source]¶
Create the comment.
- Parameters:
text_type (
unicode
) – The text type to use.- Raises:
rbtools.api.errors.APIError – An error occurred while performing API requests.
rbtools.commands.CommandError – Another error occurred while creating the comment.
- class rbtools.commands.review.AddFileAttachmentComment(options, config, *args, **kwargs)[source]¶
Bases:
AddCommentSubCommand
Subcommand to add a file attachment comment to a review draft.
- help_text = 'Add a comment to a file attachment as part of a draft review.'[source]¶
The subcommand’s help text.
- Type:
- option_list = [<rbtools.commands.OptionGroup object>, <rbtools.commands.OptionGroup object>][source]¶
Command-line options for this command.
- Type:
list
ofOption
orOptionGroup
- add_comment(text_type)[source]¶
Create the comment.
- Parameters:
text_type (
unicode
) – The text type to use.- Raises:
rbtools.api.errors.APIError – An error occurred while performing API requests.
- class rbtools.commands.review.AddGeneralComment(options, config, *args, **kwargs)[source]¶
Bases:
AddCommentSubCommand
Subcommand to add a general comment to a review draft.
- help_text = 'Add a general comment as part of a draft review.'[source]¶
The subcommand’s help text.
- Type:
- add_comment(text_type)[source]¶
Create the comment.
- Parameters:
text_type (
unicode
) – The text type to use.- Raises:
rbtools.api.errors.APIError – An error occurred while performing API requests.
- class rbtools.commands.review.Discard(options, config, *args, **kwargs)[source]¶
Bases:
ReviewSubCommand
Subcommand to discard a draft review.
- class rbtools.commands.review.Edit(options, config, *args, **kwargs)[source]¶
Bases:
ReviewSubCommand
Subcommand to create or edit draft reviews.
- class rbtools.commands.review.Publish(options, config, *args, **kwargs)[source]¶
Bases:
ReviewSubCommand
Subcommand for publishing a review draft.
- class rbtools.commands.review.Review(transport_cls=<class 'rbtools.api.transport.sync.SyncTransport'>, stdout=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, stderr=<_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>, stdin=<_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>)[source]¶
Bases:
BaseMultiCommand
RBTools command to create and publish reviews.
- description = 'Creates, updates, and edits reviews.'[source]¶
A short description of the command, suitable for display in usage text.
- Type:
- subcommands = [<class 'rbtools.commands.review.Edit'>, <class 'rbtools.commands.review.Publish'>, <class 'rbtools.commands.review.AddDiffComment'>, <class 'rbtools.commands.review.AddGeneralComment'>, <class 'rbtools.commands.review.AddFileAttachmentComment'>, <class 'rbtools.commands.review.Discard'>][source]¶
The available subcommands.
This is a list of BaseSubCommand sub classes.
- Type: