1

我正在尝试遍历私人组织中的所有存储库。以下是一些在我的机器上不起作用的示例代码(Windows 10、Python 3.6.5):

import github3

session = github3.login(token = "A token that works with other github3.py functions and also has all permissions for testing")
org = session.organization("private organization name")
repos = list(org.iter_repos(type = "all"))

当我运行它时,我得到: AttributeError: iter_repos 回溯指向我调用 iter_repos 的第 5 行。

4

1 回答 1

3

我相信你想要

   org.repositories(type="all")

iter_repos来自 pre-1.0 github3.py

于 2019-01-31T18:31:37.427 回答