我正在尝试使用 curl 和 github API 将多个用户添加到私有(private)组团队中的团队。但是,我的语法有些问题,我不确定它是什么。
我试过了:
curl --user "groupowner:password" -X PUT -d "" "https://api.github.com/orgs/ORGNAME/teams/TEAMNAME/members/USERNAMETOBEADDED/"
github 文档,例如 here很有帮助,但我错过了一些东西。寻找 here似乎另一种语法是可能的。
最佳答案
摆脱斜杠并使用团队成员 API 应该可以解决问题:
curl --user "groupowner:password" -X PUT -d "" "https://api.github.com/teams/TEAMID/memberships/USERNAMETOBEADDED"
关于curl - 将用户添加到组织存储库 github API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33654997/