From 3cd5cd4a2026f2f4c33e443a6e585a62c1ad83b9 Mon Sep 17 00:00:00 2001 From: antoineKorbit <60627077+antoineKorbit@users.noreply.github.com> Date: Tue, 20 Jun 2023 14:03:25 +0200 Subject: [PATCH] Replace deprecated position attribute --- github/PullRequest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/github/PullRequest.py b/github/PullRequest.py index a7e9bb7f49..b6276b79ed 100644 --- a/github/PullRequest.py +++ b/github/PullRequest.py @@ -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 `_ :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