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

Commit84bb636

Browse files
committed
Merge pull requestsigmavirus24#317 from helenst/pull-request-commits
PullRequest.commits returns generator of RepoCommits
2 parents36b4a67 +bda512e commit84bb636

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

‎github3/pulls.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
fromreimportmatch
1212
fromjsonimportdumps
13-
from .gitimportCommit
13+
from .repos.commitimportRepoCommit
1414
from .modelsimportGitHubObject,GitHubCore,BaseComment
1515
from .usersimportUser
1616
from .decoratorsimportrequires_auth
@@ -238,10 +238,11 @@ def commits(self, number=-1, etag=None):
238238
-1 returns all available commits.
239239
:param str etag: (optional), ETag from a previous request to the same
240240
endpoint
241-
:returns: generator of :class:`Commit <github3.git.Commit>`\ s
241+
:returns: generator of
242+
:class:`RepoCommit <github3.repos.commit.RepoCommit>`\ s
242243
"""
243244
url=self._build_url('commits',base_url=self._api)
244-
returnself._iter(int(number),url,Commit,etag=etag)
245+
returnself._iter(int(number),url,RepoCommit,etag=etag)
245246

246247
deffiles(self,number=-1,etag=None):
247248
r"""Iterate over the files associated with this pull request.

‎tests/integration/test_pulls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def test_commits(self):
3131
withself.recorder.use_cassette(cassette_name):
3232
p=self.get_pull_request()
3333
forcommitinp.commits():
34-
assertisinstance(commit,github3.git.Commit)
34+
assertisinstance(commit,github3.repos.commit.RepoCommit)
3535

3636
deftest_create_review_comment(self):
3737
"""Show that a user can create an in-line reveiw comment on a PR."""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp