我创建了一个名为testingProtectedBranch
here的临时存储库,用于使用protected branches
测试github
中curl
的创建情况。
这是我用于此目的的命令,但它不起作用。我试图找到错误大约2个小时,但我仍然找不到它。任何人都可以帮我找到这个命令中的错误。提前致谢
curl -X PUT -H "Accept:application/vnd.github.loki-preview+json" -d '{"required_status_checks": {"include_admins": true,"strict": true,"contexts": ["continuous-integration/travis-ci"]},"required_pull_request_reviews": {"include_admins": false},"restrictions": {"users": ["octocat"],"teams": ["justice-league"]}}' https://api.github.com/repos/kasunsiyambalapitiya/testingProtectedBranch/branches/master/protection
使用-vv更新
ALPN,服务器接受使用http / 1.1
PUT /repos/kasunsiyambalapitiya/testingProtectedBranch/branches/master/protection HTTP/1.1
Host: api.github.com
User-Agent: curl/7.47.0
Accept:application/vnd.github.loki-preview+json
Content-Length: 217
Content-Type: application/x-www-form-urlencoded