rbtools.commands.status¶
Implementation of rbt status.
Classes
|
Display review requests for the current repository. |
- class rbtools.commands.status.Status(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:
Command
Display review requests for the current repository.
- description = 'Output a list of your pending review requests.'[source]¶
A short description of the command, suitable for display in usage text.
- Type:
- 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:
- args = '[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 = [<rbtools.commands.Option object>, <rbtools.commands.Option object>, <rbtools.commands.Option object>, <rbtools.commands.OptionGroup object>, <rbtools.commands.OptionGroup object>, <rbtools.commands.OptionGroup object>, <rbtools.commands.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.