GithubChange (autotransform.change.github)

The implementation for the GithubChange.

class autotransform.change.github.GithubChange(*, full_github_name: str, pull_number: int)

Bases: Change

A Change representing a Pull Request on a Github repo.

full_github_name

The fully qualified name of the Github Repo the Pull Request is against.

Type

str

pull_number

The number for the Pull Request.

Type

int

name

The name of the Component.

Type

ClassVar[ChangeName]

full_github_name: str
get_batch() Batch

Gets the Batch that was used to produce the Change.

Returns

The Batch used to produce the Change.

Return type

Batch

get_created_timestamp() int

Returns the timestamp when the Pull Request was created.

Returns

The timestamp in seconds when the Pull Request was created.

Return type

int

get_labels() List[str]

Gets all labels for a Change.

Returns

The list of labels.

Return type

List[str]

get_last_updated_timestamp() int

Returns the timestamp when the Pull Request was last updated.

Returns

The timestamp in seconds when the Pull Request was last updated.

Return type

int

get_reviewers() List[str]

Gets all reviewers for a Change.

Returns

The list of reviewers.

Return type

List[str]

get_schema() AutoTransformSchema

Gets the Schema that was used to produce the Change.

Returns

The Schema used to produce the Change.

Return type

AutoTransformSchema

get_state() ChangeState

Gets the current state of the Change. Caches the state in _state to prevent excessive use of Github API.

Returns

The current state of the Change.

Return type

ChangeState

get_team_reviewers() List[str]

Gets all team reviewers for a Change.

Returns

The list of team reviewers.

Return type

List[str]

name: ClassVar[ChangeName] = 'github'
pull_number: int