使用 curl 将团队添加到存储库的正确方法

Correct way to add teams to repository with curl

正在尝试将组织团队添加到存储库,但无法使用以下方法:

curl -H "Authorization: token tokenID" -H "Content-Length: 0" -X put \
> -d "" https://url/api/v3/teams/23/repos/johndoe/repo-name

https://developer.github.com/v3/teams/#add-or-update-team-repository

从文档和这个 blog post, you must provide a custom media type 中接受 header:

application/vnd.github.hellcat-preview+json

卷曲:

curl -H "Content-Type: application/vnd.github.hellcat-preview+json"...