Version 2.8-138.d766e30bb08b fails on pullRequest.reviewComment with Missing required 'pull_request_review_thread.diff_hunk'
Error
10:39:03.188 hudson.remoting.ProxyException: org.eclipse.egit.github.core.client.RequestException: Validation Failed (422): Invalid value for 'pull_request_review_thread.path' field, Missing required 'pull_request_review_thread.diff_hunk' field
10:39:03.188 at org.eclipse.egit.github.core.client.GitHubClient.createException(GitHubClient.java:585)
10:39:03.188 at org.eclipse.egit.github.core.client.GitHubClient.sendJson(GitHubClient.java:676)
10:39:03.188 at org.eclipse.egit.github.core.client.GitHubClient.post(GitHubClient.java:795)
What Operating System are you using (both controller, and any agents involved in the problem)?
Linux
Reproduction steps
send a comment to Github Enterprise (GitHub Enterprise Server 3.2.6) PR using pullRequest.reviewComment
Got error saying, when sending review comments based on a list of findings cfg.results.each { pullRequest.reviewComment(_last_commit.sha, it.path, it.start.line, body) }
10:39:03.188 hudson.remoting.ProxyException: org.eclipse.egit.github.core.client.RequestException: Validation Failed (422): Invalid value for 'pull_request_review_thread.path' field, Missing required 'pull_request_review_thread.diff_hunk' field
10:39:03.188 at org.eclipse.egit.github.core.client.GitHubClient.createException(GitHubClient.java:585)
10:39:03.188 at org.eclipse.egit.github.core.client.GitHubClient.sendJson(GitHubClient.java:676)
10:39:03.188 at org.eclipse.egit.github.core.client.GitHubClient.post(GitHubClient.java:795)
10:39:03.188 at org.jenkinsci.plugins.pipeline.github.client.ExtendedPullRequestService.createComment2(ExtendedPullRequestService.java:136)
10:39:03.188 at org.jenkinsci.plugins.pipeline.github.PullRequestGroovyObject.reviewComment(PullRequestGroovyObject.java:693)
...
Jenkins and plugins versions report
2.8-138.d766e30bb08b Latest on 13 Sep 2021
Version 2.8-138.d766e30bb08b fails on pullRequest.reviewComment with Missing required 'pull_request_review_thread.diff_hunk'
Error
What Operating System are you using (both controller, and any agents involved in the problem)?
Linux
Reproduction steps
cfg.results.each { pullRequest.reviewComment(_last_commit.sha, it.path, it.start.line, body) }
Expected Results
reviewcomment works
Actual Results
error
Anything else?
No response