octokit / rest.js

GitHub REST API client for JavaScript
https://octokit.github.io/rest.js
MIT License
554 stars 65 forks source link

Documentation for #create_pull_request_review and #submit_pull_request_review isn't very intuitive #10

Open Jaskaranbir opened 5 years ago

Jaskaranbir commented 5 years ago

The documentation for submit-a-pull-request-review and create-a-pull-request-review doesn't really say what the difference is between the two. Both post a PR review to GitHub.

IMO atleast something should be mentioned as to when to use which. This might make sense upon checking the responses of each endpoint and checking the params, but for new API users, it might cause some confusion (it did for me).

gr2m commented 5 years ago

Very good point, I agree! I never run into it myself but now that I compare the two I wouldn't easily know when to use which. Let me ask the docs team about it, maybe the documentation could be improved there. Once it does the docs of @octokit/rest will get updated as well

gr2m commented 5 years ago

The documentation team is looking into it.

Update Sep 13, 2019: the issue is still open Update May 7, 2020: the issue is still open

DanielTrace commented 4 years ago
gr2m commented 3 years ago

The new routes are https://docs.github.com/en/rest/reference/pulls#submit-a-review-for-a-pull-request and https://docs.github.com/en/rest/reference/pulls#create-a-review-for-a-pull-request. The difference between them is still not very clear.

But there is a public documentation repository now, we should create an issue there instead: https://github.com/github/docs