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

[JENKINS-63662] pullRequest.reviewComment method is broken with ' line required and an integer greater than zero'

Open jenkins-infra-bot opened this issue 5 years ago • 1 comments

Copied from https://github.com/jenkinsci/pipeline-github-plugin/issues/88

Getting `org.eclipse.egit.github.core.client.RequestException: Validation Failed (422): line required and an integer greater than zero`
The method documentation has a lineNumber parameter (https://github.com/jenkinsci/pipeline-github-plugin#adding-a-review-comment)

while the code(https://github.com/jenkinsci/pipeline-github-plugin/blob/master/src/main/java/org/jenkinsci/plugins/pipeline/github/PullRequestGroovyObject.java#L676-L679) has a position parameter and it needs both by GitHb Api Documentation (https://developer.github.com/v3/pulls/comments/#create-a-review-comment-for-a-pull-request).

There's a fix (https://github.com/tomasbjerre/violation-comments-to-github-lib/pull/9/files#) to a similar problem


Originally reported by talbarda88, imported from: pullRequest.reviewComment method is broken with ' line required and an integer greater than zero'
  • assignee: lanwen
  • status: Open
  • priority: Major
  • component(s): github-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-08
Raw content of original issue

Copied from https://github.com/jenkinsci/pipeline-github-plugin/issues/88

Getting `org.eclipse.egit.github.core.client.RequestException: Validation Failed (422): line required and an integer greater than zero` The method documentation has a lineNumber parameter (https://github.com/jenkinsci/pipeline-github-plugin#adding-a-review-comment)

while the code(https://github.com/jenkinsci/pipeline-github-plugin/blob/master/src/main/java/org/jenkinsci/plugins/pipeline/github/PullRequestGroovyObject.java#L676-L679) has a position parameter and it needs both by GitHb Api Documentation (https://developer.github.com/v3/pulls/comments/#create-a-review-comment-for-a-pull-request).

There's a fix (https://github.com/tomasbjerre/violation-comments-to-github-lib/pull/9/files#) to a similar problem

1 attachment

jenkins-infra-bot avatar Sep 13 '20 11:09 jenkins-infra-bot

talbarda88:

lanwen - any update there?

jenkins-infra-bot avatar Sep 22 '20 13:09 jenkins-infra-bot