Skip to content

iter_list_branches

iter_list_branches(
    repository_name: RepositoryName,
    *,
    config_overrides: Optional[CodeCommitClientConfig] = None,
    next_token: Optional[NextToken] = None,
) -> Iterator[BranchName]
Source code in docs_src/capo_codecommit/_services/code_commit.py
def iter_list_branches(
    self,
    repository_name: "capo_codecommit.types.repository_name.RepositoryName",
    *,
    config_overrides: Optional[CodeCommitClientConfig] = None,
    next_token: Optional["capo_codecommit.types.next_token.NextToken"] = None,
) -> "Iterator[capo_codecommit.types.branch_name.BranchName]":
    _token = next_token
    while True:
        _response = self.list_branches(
            repository_name,
            config_overrides=config_overrides,
            next_token=_token,
        )
        _page = _resolve_path(_response, ("branches",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break