ChangeStateCondition (autotransform.step.condition.state)

The implementation for the ChangeStateCondition.

class autotransform.step.condition.state.ChangeStateCondition(*, comparison: ComparisonType, value: Union[ChangeState, List[ChangeState]])

Bases: ComparisonCondition[ChangeState]

A condition which checks the ChangeState against the state supplied using the supplied comparison.

comparison

The type of comparison to perform.

Type:

ComparisonType

value

The state(s) to compare against.

Type:

ChangeState | List[ChangeState]

name

The name of the Component.

Type:

ClassVar[ConditionName]

comparison: ComparisonType
get_val_from_change(change: Change) ChangeState

Gets the state from the Change.

Parameters:

change (Change) – The Change the Condition is checking.

Returns:

The state of the Change.

Return type:

ChangeState

name: ClassVar[ConditionName] = 'change_state'
value: Union[ChangeState, List[ChangeState]]
class autotransform.step.condition.state.MergeableStateCondition(*, comparison: ComparisonType, value: Union[str, List[str]])

Bases: ComparisonCondition[str]

A condition which checks the mergeable state against the state supplied using the supplied comparison.

comparison

The type of comparison to perform.

Type:

ComparisonType

value

The state(s) to compare against.

Type:

str | List[str]

name

The name of the Component.

Type:

ClassVar[ConditionName]

comparison: ComparisonType
get_val_from_change(change: Change) str

Gets the mergeable state from the Change.

Parameters:

change (Change) – The Change the Condition is checking.

Returns:

The mergeable state of the Change.

Return type:

str

name: ClassVar[ConditionName] = 'mergeable_state'
value: Union[str, List[str]]
class autotransform.step.condition.state.ReviewStateCondition(*, comparison: ComparisonType, value: Union[ReviewState, List[ReviewState]])

Bases: ComparisonCondition[ReviewState]

A condition which checks the ReviewState against the state supplied using the supplied comparison.

comparison

The type of comparison to perform.

Type:

ComparisonType

value

The state(s) to compare against.

Type:

ReviewState | List[ReviewState]

name

The name of the Component.

Type:

ClassVar[ConditionName]

comparison: ComparisonType
get_val_from_change(change: Change) ReviewState

Gets the review state from the Change.

Parameters:

change (Change) – The Change the Condition is checking.

Returns:

The review state of the Change.

Return type:

ReviewState

name: ClassVar[ConditionName] = 'review_state'
value: Union[ReviewState, List[ReviewState]]
class autotransform.step.condition.state.TestStateCondition(*, comparison: ComparisonType, value: Union[TestState, List[TestState]])

Bases: ComparisonCondition[TestState]

A condition which checks the TestState against the state supplied using the supplied comparison.

comparison

The type of comparison to perform.

Type:

ComparisonType

value

The state(s) to compare against.

Type:

TestState | List[TestState]

name

The name of the Component.

Type:

ClassVar[ConditionName]

comparison: ComparisonType
get_val_from_change(change: Change) TestState

Gets the state from the Change.

Parameters:

change (Change) – The Change the Condition is checking.

Returns:

The test state of the Change.

Return type:

TestState

name: ClassVar[ConditionName] = 'test_state'
value: Union[TestState, List[TestState]]