Skip to content

Commit 83a0d40

Browse files
committed
Update docs with warning.
1 parent 2925386 commit 83a0d40

3 files changed

Lines changed: 16 additions & 0 deletions

File tree

docs/repos.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ This part of the documentation covers:
2020
None of these objects should be instantiated directly by the user (developer).
2121
These are here for reference only.
2222

23+
**When listing repositories in any context, GitHub refuses to return a number
24+
of attributes, e.g., source and parent. If you require these, call the refresh
25+
method on the repository object to make a second call to the API and retrieve
26+
those attributes.**
27+
2328
More information for about this class can be found in the official
2429
`documentation <http://developer.github.com/v3/repos>`_ and in various other
2530
sections of the GitHub documentation.

docs/users.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ This part of the documentation covers:
1212

1313
None of these objects should ever be instantiated by the user (developer).
1414

15+
**When listing users, GitHub only sends a handful of the object's attributes.
16+
To retrieve all of the object's attributes, you must call the refresh()
17+
method. This unfortunately requires another call to the API, so use it
18+
sparingly if you have a low limit**
19+
1520
User Modules
1621
------------
1722

github3/pulls.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
77
"""
88

9+
from re import match
910
from github3.git import Commit
1011
from github3.models import GitHubObject, GitHubCore, BaseComment
1112
from github3.users import User
@@ -137,6 +138,11 @@ def __init__(self, pull, session=None):
137138
self.number = pull.get('number')
138139
#: The URL of the patch
139140
self.patch_url = pull.get('patch_url')
141+
142+
m = match('https://github\.com/(\S+)/(\S+)/issues/\d+',
143+
self.issue_url)
144+
#: Returns ('owner', 'repository') this issue was filed on.
145+
self.repository = m.groups()
140146
#: The state of the pull
141147
self.state = pull.get('state')
142148
#: The title of the request

0 commit comments

Comments
 (0)