0

我正在尝试使用 github3py 编写一个简单的脚本,将存储库添加到团队中。

add_repo(repo, team)方法无论如何都没有指定我希望我的团队拥有什么样的权限,根据:http: //github3.readthedocs.io/en/develop/orgs.html

vs 在 github 文档中,它说您可以将权限作为参数传递: https ://developer.github.com/v3/orgs/teams/#add-or-update-team-repository

那么这只是没有在 github3.py 中实现还是我很困惑?

我希望能够添加一个具有读写权限的团队。这默认为读取。

4

1 回答 1

0

好吧,看起来还有另一个同名的方法,但对象Team

add_repository(repository, permission=u'')
Add repository to this team.

Parameters: 
repository (str) – (required), form: ‘user/repo’
permission (str) – (optional), (‘pull’, ‘push’, ‘admin’)

这样您就可以指定权限。

于 2017-05-04T14:19:47.233 回答