【发布时间】:2021-11-19 13:48:53
【问题描述】:
我尝试使用 curl / Postman 获取分支策略,但是我不断收到错误“404 Not Found”。
根据文档 (https://docs.github.com/en/rest/reference/repos#get-branch-protection),我似乎使用了正确的 API Uri。请参阅下面使用的命令。 Ps:Auth Token 已经通过验证。
对于卷曲:
curl \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/{owner}/{repo}/branches/{branch}/protection
邮递员:
https://api.github.com/repos/{owner}/{repo}/branches/{branch}/protection
我需要 API 调用来返回分支保护。谢谢!
【问题讨论】:
标签: api rest github curl postman