Closed lzap closed 11 years ago
Yes, it is possible to comment on pull requests.
Pull requests are actually implemented as issues as far as the API is concerned.
So technically you can pull a single pull request.
pull = gh.repos("rauhryan","ghee").pulls(13)
You can actually comment on the pull request by accessing it like an issue
gh.repos("rauhryan", "ghee").issues(pull["number"]).comments.create({:body => "hey i'll help fix that suck"})
You bring up a good point that it appears that you can't comment on pull requests. It won't be that hard for me to add comment support to pull requests by delegating it to the issues code in my library.
Thanks a lot! I'll let you know when I add proper support. I hope this helps you in the mean time.
-Ryan
Ah, hmm. I have tried it and github.com is giving me
{"message"=>"Not Found"}
for some reason. The repo has issues disabled tho. I will try with a repo with issues enabled.
Thanks for help.
Update: So it is giving me 404 in all cases. I am not using git version, the latest stable gem.
Update 2: Exact issue is:
gh.repos("xxx", "yyy").issues(1).comments.create({:body => "hey i'll help fix that suck"})
{"message"=>"Not Found"}
But the pull request is there, if I go to the issues/1 it gets redirected, issues are enabled. What is possibly wrong?
Any hints for me? Why am I getting 404 while the data is there...
Okay I got it, token was not correctly generated (repos vs repo scope issue).
Hey,
I wonder if it is possible to comment pull requests. I would like to create a bot that would run unit tests and adding results as comments.
Thanks.