本文介绍了从GitHub拉取请求获取评论列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
根据
我应该可以得到一个列表通过发表以下curl声明发表评论,但是,它将返回空白,好像没有评论,有什么想法为什么?或者我如何才能使这个工作?
curlhttps://api.github.com/repos/37signals/sub / b $ / pre>
谢谢!
解决方案注意(在TOC下):
因此,API端点用于请求审阅评论的评论,而非正常的请求评论:
So, the API endpoint you are currently using is intended for Pull request review comments, not the normal Pull request comments:
Since the pull request you are referencing does not have any review comments, you are getting the correct result (an empty list). However, as I mentioned above, the API endpoint you should be hitting is the one for issue comments (just use the same pull request ID since it is equal to the issue ID):
curl "https://api.github.com/repos/37signals/sub/issues/37/comments" -v
这篇关于从GitHub拉取请求获取评论列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!