-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
hi
I am trying to create pr review comments but getting this error:
Traceback (most recent call last):
File "/action_internal/main.py", line 173, in <module>
main()
File "/action_internal/main.py", line 169, in main
send_code_comments(repo_token, after_sha, repo_name, int(issue_number), lines)
File "/action_internal/comment.py", line 35, in send_code_comments
pr.create_review_comment(
File "/usr/lib/python3.10/site-packages/github/PullRequest.py", line 431, in create_review_comment
headers, data = self._requester.requestJsonAndCheck(
File "/usr/lib/python3.10/site-packages/github/Requester.py", line 398, in requestJsonAndCheck
return self.__check(
File "/usr/lib/python3.10/site-packages/github/Requester.py", line 423, in __check
raise self.__createException(status, responseHeaders, output)
github.GithubException.GithubException: 422 {"message": "Validation Failed", "errors": [{"resource": "PullRequestReviewComment", "code": "custom", "field": "pull_request_review_thread.end_commit_oid", "message": "pull_request_review_thread.end_commit_oid is not part of the pull request"}, {"resource": "PullRequestReviewComment", "code": "missing_field", "field": "pull_request_review_thread.diff_hunk"}], "documentation_url": "https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request"}It seems that some object defs were out-of-dated.
PyGithub/github/PullRequest.py
Line 425 in 300c501
| post_parameters = { |
post_parameters = {
"body": body,
"commit_id": commit_id._identity,
"path": path,
"position": position,
}The official doc said position is deprecated. Use line instead.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels