GithubRepo (autotransform.repo.github)
The implementation for the GithubRepo.
- class autotransform.repo.github.GithubRepo(*, base_branch: str, full_github_name: str, hide_automation_info: bool = False, hide_autotransform_docs: bool = False, labels: List[str] = None, reviewers: List[str] = None, team_reviewers: List[str] = None)
Bases:
GitRepo
A Repo that provides support for submitting changes as a pull request against a Github repo.
- full_github_name
The fully qualified name of the Github Repo.
- Type
str
- hide_automation_info
Whether to hide information on how automation was done from the pull request body. Defaults to False.
- Type
bool, optional
- hide_autotransform_docs
Whether to hide links to AutoTransform docs from the pull request body. Defaults to False.
- Type
bool, optional
- labels
The labels to add to pull requests. Defaults to [].
- Type
List[str], optional
- reviewers
The reviewers to request for pull requests. Defaults to [].
- Type
List[str], optional
- team_reviewers
The team reviewers to request for pull requests. Defaults to [].
- Type
List[str], optional
- full_github_name: str
- get_automation_info(schema: Optional[AutoTransformSchema], batch: Batch) str
Gets information on automating with AutoTransform.
- Parameters
schema (Optional[AutoTransformSchema]) – The Schema making the Change.
batch (Batch) – The Batch the Change is being made for.
- Returns
The text for automating.
- Return type
str
- get_outstanding_changes() Sequence[GithubChange]
Gets all outstanding pull requests for the Repo.
- Returns
The outstanding Changes against the Repo.
- Return type
Sequence[GithubChange]
- hide_automation_info: bool
- hide_autotransform_docs: bool
- labels: List[str]
- reviewers: List[str]
- submit(batch: Batch, _transform_data: Optional[Mapping[str, Any]], change: Optional[Change] = None) None
Performs the normal submit for a git repo then submits a pull request against the provided Github repo.
- team_reviewers: List[str]