Change (autotransform.change.base)
The base class and associated classes for Change components.
- class autotransform.change.base.Change
Bases:
NamedComponent
The base for Change components. Used by AutoTransform to manage submissions to code review and source control systems.
- name
The name of the Component.
- Type
ClassVar[ChangeName]
- abstract abandon() bool
Close out and abandon a Change, removing it from the code review and/or version control system.
- Returns
Whether the abandon was completed successfully.
- Return type
bool
- abstract get_batch() Batch
Gets the Batch that was used to produce the Change.
- Returns
The Batch used to produce the Change.
- Return type
- get_created_timestamp() int
Returns the timestamp when the Change was created.
- Returns
The timestamp in seconds when the Change was created.
- Return type
int
- get_last_updated_timestamp() int
Returns the timestamp when the Change was last updated.
- Returns
The timestamp in seconds when the Change was last updated.
- Return type
int
- abstract get_schema() AutoTransformSchema
Gets the Schema that was used to produce the Change.
- Returns
The Schema used to produce the Change.
- Return type
- abstract get_state() ChangeState
Gets the current state of the Change.
- Returns
The current state of the Change.
- Return type
- name: ClassVar[ChangeName]
- take_action(action_type: ActionType, runner: Runner) bool
Tells the Change to take an action based on the results of a Step run.
- Parameters
action_type (ActionType) – The action to take.
runner (Runner) – A Runner which can be used to take an action.
- Returns
Whether the action was taken successfully.
- Return type
bool