Fix PR review creation. (#1184)

Do not modify the attributes of a PR when creating a review.
This commit is contained in:
Olof-Joachim Frahm (欧雅福)
2019-08-09 19:12:55 +10:00
committed by Steve Kowalik
parent 8abd50e225
commit e90cdab06d
2 changed files with 3 additions and 1 deletions
-1
View File
@@ -449,7 +449,6 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
self.url + "/reviews",
input=post_parameters
)
self._useAttributes(data)
return github.PullRequestReview.PullRequestReview(self._requester, headers, data, completed=True)
def create_review_request(self, reviewers=github.GithubObject.NotSet, team_reviewers=github.GithubObject.NotSet):
+3
View File
@@ -50,6 +50,9 @@ class PullRequestReview(Framework.TestCase):
# Test ability to get a single review
self.pullreview = self.pull.get_review(28482091)
def testDoesNotModifyPullRequest(self):
self.assertEqual(self.pull.id, 111649703)
def testDismiss(self):
self.pullreview.dismiss("with prejudice")
pr = self.pull.get_review(28482091)