Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept non-PR "plain" commit for commenting on #42

Open
andrelkin opened this issue Jun 7, 2020 · 6 comments
Open

Accept non-PR "plain" commit for commenting on #42

andrelkin opened this issue Jun 7, 2020 · 6 comments
Labels
enhancement New feature or request

Comments

@andrelkin
Copy link

andrelkin commented Jun 7, 2020

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 andrelkin changed the title Accept non-PR "plain" commit review Accept non-PR "plain" commit for commenting on Jun 8, 2020
@charignon
Copy link
Owner

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

@charignon
Copy link
Owner

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 #43 you would use the same entrypoint as for reviewing a PR but it would only submit inline comments and no approval status.

@charignon charignon added the enhancement New feature or request label Jun 27, 2020
@andrelkin
Copy link
Author

@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 :-)!

@charignon
Copy link
Owner

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?

@andrelkin
Copy link
Author

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
Copy link
Author

andrelkin commented Jun 29, 2020

Does that make sense?

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants