如何使用github API获取一个仓库的团队树

时间:2019-05-08 05:57:43

标签: python github github-api

我正在使用github的企业版。我们有不同级别的团队,

例如:组织->父团队->子团队->子子团队->回购

我想打印出一个仓库的团队关系,就像 父团队->子团队->次子团队

如何通过github api进行操作,例如,我可以得到团队:

client = Github(base_url=f'https://{hostname}/api/v3', login_or_token=token)
    teams = client.get_organization(organization).get_repo(repo.full_name).get_teams()

但是我得到的结果是:

parent team

child team

sub child team

没有层次关系

我期望的结果:

parent team-> child team -> sub-child team

有人可以帮助我吗?

0 个答案:

没有答案
相关问题