Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb25c1d6

Browse files
committed
Rename iter_review_comments to be compatiable with 1.0
1 parentbab14ba commitb25c1d6

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
returnself._iter(int(number),url,IssueComment,etag=etag)
301301

302-
defiter_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-
returnself._iter(int(number),url,ReviewComment,etag=etag)
312-
313302
@requires_auth
314303
defmerge(self,commit_message=''):
315304
"""Merge this pull request.
@@ -340,6 +329,17 @@ def reopen(self):
340329
"""
341330
returnself.update(self.title,self.body,'open')
342331

332+
defreview_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+
returnself._iter(int(number),url,ReviewComment,etag=etag)
342+
343343
@requires_auth
344344
defupdate(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
withself.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
assertisinstance(comment,github3.pulls.ReviewComment)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp