I am trying to add an comment on a Pull Request from an Java Application in Eclipse using GitHub Java API (org.eclipse.egit.github.core).
The scenario should be:
But then i got this exception:
org.eclipse.egit.github.core.client.RequestException: Invalid request.
No subschema in "oneOf" matched.
For 'properties/commit_id', nil is not a string.
For 'properties/path', nil is not a string.
I don't know what to set for commit_id and path? Can I get those information from the webhook-payload somehow?
Solved! Solved! Go to Solution.
Commit comments, which you mention in the title of your post, are separate and different from Pull Request comments, which you mention in the body of your post. There are also Pull Request review comments, which are another type of comment associated with Pull Requests.
If you want to simply add a comment to the pull request conversation page that is not a review comment, you should use the same endpoint as you would for creating a comment on an issue. I don't know what that translates to in your Java library, but that should point you in the right direction.
Let us know if you have more questions.