github-review icon indicating copy to clipboard operation
github-review copied to clipboard

Accept non-PR "plain" commit for commenting on

Open andrelkin opened this issue 4 years ago • 6 comments

It would be awesome to have repos/:owner/:repo/commits/:sha-1 covered as well in that to allow comments to fetch and submit.

~It looks I confused API sets to think the submit functionality exists plain SHA-1 commits.~ Finally I recovered the page I meant for the submitting: https://developer.github.com/v3/repos/comments/#list-commit-comments

POST /repos/:owner/:repo/commits/:commit_sha/comments

So it must be feasible to implement. I may entertain myself in doing so :-)

Thanks for this wonderful package!

andrelkin avatar Jun 07 '20 18:06 andrelkin

If you get a chance to do it, feel free to send a pull request, I would be happy to review it.

charignon avatar Jun 10 '20 07:06 charignon

I have a prototype on a branch, can you test it to see how it works for you? If it works fine I will refactor it, add more tests and merge it. @andrelkin https://github.com/charignon/github-review/pull/43 you would use the same entrypoint as for reviewing a PR but it would only submit inline comments and no approval status.

charignon avatar Jun 27 '20 07:06 charignon

@charignon, thank you! You beat me to the patch that I've been also slowly developing (already testing). Sure I'll review and test your work.

As to

you would use the same entrypoint as for reviewing a PR but it would only submit >inline comments and no approval status. you must mean there are 2 PR:s for this issue and I should pick #43 to place my comments in. Sorry I could not get the last sentence though.

Have a wonderful week ahead :-)!

andrelkin avatar Jun 29 '20 08:06 andrelkin

I meant that: (1) you should call github-review-start to start reviewing a commit (2) you should call either github-review-approve or github-review-comment or github-review-reject to submit a review on a commit, even if they will just comment (there is no concept of rejecting or approving a commit) (3) when reviewing a commit, github-review will only look at inline comments and not top level comments (comments above the start of the diff), as there are no API to submit the latter.

Does that make sense?

charignon avatar Jun 29 '20 15:06 charignon

Thank you for spelling out! Indeed I learned that already while working on my patch version, but how could you know :-). I really appreciate your care!

andrelkin avatar Jun 29 '20 18:06 andrelkin

Does that make sense?

I think it does, I don't see any other option.

andrelkin avatar Jun 29 '20 18:06 andrelkin