【发布时间】:2014-04-20 08:05:58
【问题描述】:
这里的文档:
http://developer.github.com/v3/repos/merging/
说你可以在你的 body head 中包含一个提交 SHA1,但我似乎无法让它工作。
这是我尝试发送的内容
HTTParty.post('http://github.com/api/v3/repos/sclayton/puppet-modules/merges', :basic_auth => auth, :headers=>{'Content-Type' => "application/json"},
:body => {
"base" => "stage",
'head'=>"sha: a593765fc0861e99b4c9538e75676c55be264f01"}.to_json)
和
'head'=>"a593765fc0861e99b4c9538e75676c55be264f01"}.to_json
和
'head'=>{"sha" =>"a593765fc0861e99b4c9538e75676c55be264f01"}}.to_json)
我想知道是否有人通过 Github API 完成了合并单个提交?
【问题讨论】:
-
您从 API 收到什么响应?此外,您链接到的文档明确指出 base 和 head 都应该是字符串。您尝试的第二件事应该起作用了。没有 API 的响应,虽然我帮不了你。
标签: github-api