10000 Coerce position to integer, not to strings · omgjlk/github3.py@dcdf060 · GitHub
[go: up one dir, main page]

Skip to content

Commit dcdf060

Browse files
committed
Coerce position to integer, not to strings
In PullRequest#create_review_comment we were coercing the `position` argument to a string instead of coercing it to an integer. This was causing a Validation Error on GitHub's end and preventing users from creating review comments. Closes sigmavirus24#374 (cherry picked from commit a2acb38)
1 parent 787c22a commit dcdf060

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

github3/pulls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def create_review_comment(self, body, commit_id, path, position):
242242
"""
243243
url = self._build_url('comments', base_url=self._api)
244244
data = {'body': body, 'commit_id': commit_id, 'path': path,
245-
'position': str(position)}
245+
'position': int(position)}
246246
json = self._json(self._post(url, data=data), 201)
247247
return self._instance_or_null(ReviewComment, json)
248248

0 commit comments

Comments
 (0)
0