rbtools.commands.status¶
Implementation of rbt status.
Classes
|
Display review requests for the current repository. |
- class rbtools.commands.status.Status(transport_cls: Type[Transport] = <class 'rbtools.api.transport.sync.SyncTransport'>, stdout: TextIO = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, stderr: TextIO = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>, stdin: TextIO = <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>)[source]¶
Bases:
BaseCommand
Display review requests for the current repository.
- description: str = 'Output a list of your pending review requests.'[source]¶
A short description of the command, suitable for display in usage text.
- Type:
- needs_api: bool = 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:
- args: str = '[review-request [revision]]'[source]¶
Usage text for what arguments the command takes.
Arguments for the command are anything passed in other than defined options (for example, revisions passed to rbt post).
- Type:
- option_list: List[Union[Option, OptionGroup]] = [<rbtools.commands.base.options.Option object>, <rbtools.commands.base.options.Option object>, <rbtools.commands.base.options.Option object>, <rbtools.commands.base.options.OptionGroup object>, <rbtools.commands.base.options.OptionGroup object>, <rbtools.commands.base.options.OptionGroup object>, <rbtools.commands.base.options.OptionGroup object>][source]¶
Command-line options for this command.
- Type:
list
ofOption
orOptionGroup
- get_data(review_requests)[source]¶
Return current status and review summary for all review requests.
- Parameters:
review_requests (
ListResource
) – A ListResource that contains data on all open/draft review requests.- Returns:
A list whose elements are dicts of each review request’s statistics.
- Return type:
- initialize()[source]¶
Initialize the command.
This override of the base command initialize method exists so we can conditionally set whether the SCM Client is necessary. Without any options, this command will only print the status of review requests on the current repository, which requires the client. If –all is passed, this command only needs the API.