【发布时间】:2021-05-27 05:42:55
【问题描述】:
我已将 repo 的一些更改推送到 github 上的新分支 copyright_updater。更改在 github 上。
现在我想创建一个拉取请求。我一直在查看API documentation 并想出了以下命令来创建拉取请求:
curl \
-X POST \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/alex4200/hello-world/pulls" \
-d '{"head":"copyright_updater","base":"master"}'
但是,这会返回输出
{
"message": "Not Found",
"documentation_url": "https://docs.github.com/rest/reference/pulls#create-a-pull-request"
}
那么这次我错过了什么?
附:它看起来不是授权问题。即使使用令牌,我也会得到相同的回复。
【问题讨论】:
-
如果你真的想重新发明这个轮子,我可以推荐 Postman 吗?
-
那只是为了测试!最后,我将为此使用 python。但它必须首先工作,但它没有。
-
Postman 将测试然后为你编写 curl 或 python 或其他任何东西。
-
我正在使用文档中的示例。文档中记录的示例应该可以工作。为什么它不工作?缺少什么?