Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
Replace deprecated position attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
antoineKorbit authored Jun 20, 2023
1 parent c2b1db9 commit 3cd5cd4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions github/PullRequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,24 +409,24 @@ def create_comment(self, body, commit_id, path, position):
"""
return self.create_review_comment(body, commit_id, path, position)

def create_review_comment(self, body, commit_id, path, position):
def create_review_comment(self, body, commit_id, path, line):
"""
:calls: `POST /repos/{owner}/{repo}/pulls/{number}/comments <https://docs.github.com/en/rest/reference/pulls#review-comments>`_
:param body: string
:param commit_id: :class:`github.Commit.Commit`
:param path: string
:param position: integer
:param line: integer
:rtype: :class:`github.PullRequestComment.PullRequestComment`
"""
assert isinstance(body, str), body
assert isinstance(commit_id, github.Commit.Commit), commit_id
assert isinstance(path, str), path
assert isinstance(position, int), position
assert isinstance(line, int), line
post_parameters = {
"body": body,
"commit_id": commit_id._identity,
"path": path,
"position": position,
"line": line,
}
headers, data = self._requester.requestJsonAndCheck(
"POST", f"{self.url}/comments", input=post_parameters
Expand Down

0 comments on commit 3cd5cd4

Please sign in to comment.