Skip to content

Commit b25c1d6

Browse files
committed
Rename iter_review_comments to be compatiable with 1.0
1 parent bab14ba commit b25c1d6

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

github3/pulls.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -299,17 +299,6 @@ def iter_issue_comments(self, number=-1, etag=None):
299299
url = self._build_url(base_url=self.links['comments'])
300300
return self._iter(int(number), url, IssueComment, etag=etag)
301301

302-
def iter_review_comments(self, number=-1, etag=None):
303-
r"""Iterate over the review comments on this pull request.
304-
:param int number: (optional), number of comments to return. Default:
305-
-1 returns all available comments.
306-
:param str etag: (optional), ETag from a previous request to the same
307-
endpoint
308-
:returns: generator of :class:`ReviewComment <ReviewComment>`\ s
309-
"""
310-
url = self._build_url('comments', base_url=self._api)
311-
return self._iter(int(number), url, ReviewComment, etag=etag)
312-
313302
@requires_auth
314303
def merge(self, commit_message=''):
315304
"""Merge this pull request.
@@ -340,6 +329,17 @@ def reopen(self):
340329
"""
341330
return self.update(self.title, self.body, 'open')
342331

332+
def review_comments(self, number=-1, etag=None):
333+
r"""Iterate over the review comments on this pull request.
334+
:param int number: (optional), number of comments to return. Default:
335+
-1 returns all available comments.
336+
:param str etag: (optional), ETag from a previous request to the same
337+
endpoint
338+
:returns: generator of :class:`ReviewComment <ReviewComment>`\ s
339+
"""
340+
url = self._build_url('comments', base_url=self._api)
341+
return self._iter(int(number), url, ReviewComment, etag=etag)
342+
343343
@requires_auth
344344
def update(self, title=None, body=None, state=None):
345345
"""Update this pull request.

tests/integration/test_pulls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ def test_reply(self):
4242
cassette_name = self.cassette_name('reply')
4343
with self.recorder.use_cassette(cassette_name):
4444
p = self.gh.pull_request('sigmavirus24', 'github3.py', 286)
45-
c = next(p.iter_review_comments())
45+
c = next(p.review_comments())
4646
comment = c.reply('Replying to comments is fun.')
4747
assert isinstance(comment, github3.pulls.ReviewComment)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy