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:
- recieving the payload from the webhook at the pull request
- connect to the repository
- get the pull request
- add the comment (using PullRequestService.createComment(…); one of the Parameters is CommitComment -> create Object and set necessary variables.
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?