Correct URL for assignees on PRs (#1296)

The URL that was used for POST/DELETE when adding and removing
assignees was the PR itself, when it should be the issue_url.

Fixes #1294
This commit is contained in:
Steve Kowalik
2019-11-25 20:44:13 +11:00
committed by GitHub
parent fb19d2f271
commit 3170cafce5
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -804,7 +804,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
post_parameters = {"assignees": [assignee.login if isinstance(assignee, github.NamedUser.NamedUser) else assignee for assignee in assignees]}
headers, data = self._requester.requestJsonAndCheck(
"POST",
self.url + "/assignees",
self.issue_url + "/assignees",
input=post_parameters
)
self._useAttributes(data)
@@ -819,7 +819,7 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
post_parameters = {"assignees": [assignee.login if isinstance(assignee, github.NamedUser.NamedUser) else assignee for assignee in assignees]}
headers, data = self._requester.requestJsonAndCheck(
"DELETE",
self.url + "/assignees",
self.issue_url + "/assignees",
input=post_parameters
)
self._useAttributes(data)