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]
- abandon() bool
Close the Pull Request and delete the associated branch.
- Returns
Whether the abandon was completed successfully.
- Return type
bool
- 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
- 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_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_schema() AutoTransformSchema
Gets the Schema that was used to produce the Change.
- Returns
The Schema used to produce the Change.
- Return type
- 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
- name: ClassVar[ChangeName] = 'github'
- pull_number: int