8000 Coerce position to integer, not to strings · nicoddemus/github3.py@a2acb38 · GitHub
[go: up one dir, main page]

Skip to content

Commit a2acb38

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
1 parent afdba48 commit a2acb38

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
@@ -233,7 +233,7 @@ def create_review_comment(self, body, commit_id, path, position):
233233
"""
234234
url = self._build_url('comments', base_url=self._api)
235235
data = {'body': body, 'commit_id': commit_id, 'path': path,
236-
'position': str(position)}
236+
'position': int(position)}
237237
json = self._json(self._post(url, data=data), 201)
238238
return ReviewComment(json, self) if json else None
239239

0 commit comments

Comments
 (0)
0