@@ -24,8 +24,8 @@ class PullDestination(models.GitHubCore):
24
24
http://developer.github.com/v3/pulls/#get-a-single-pull-request
25
25
"""
26
26
27
- def __init__ (self , dest , direction ):
28
- super (PullDestination , self ).__init__ (dest )
27
+ def __init__ (self , dest , direction , session = None ):
28
+ super (PullDestination , self ).__init__ (dest , session )
29
29
from .repos .repo import ShortRepository
30
30
#: Direction of the merge with respect to this destination
31
31
self .direction = direction
@@ -36,7 +36,7 @@ def __init__(self, dest, direction):
36
36
#: :class:`User <github3.users.User>` representing the owner
37
37
self .user = None
38
38
if dest .get ('user' ):
39
- self .user = users .ShortUser (dest .get ('user' ), None )
39
+ self .user = users .ShortUser (dest .get ('user' ), self )
40
40
#: SHA of the commit at the head
41
41
self .sha = dest .get ('sha' )
42
42
self ._repo_name = ''
@@ -118,7 +118,7 @@ def _update_attributes(self, pull):
118
118
self ._api = pull ['url' ]
119
119
120
120
#: Base of the merge
121
- self .base = PullDestination (pull ['base' ], 'Base' )
121
+ self .base = PullDestination (pull ['base' ], 'Base' , self )
122
122
123
123
#: Body of the pull request message
124
124
self .body = pull ['body' ]
@@ -136,7 +136,7 @@ def _update_attributes(self, pull):
136
136
self .created_at = self ._strptime_attribute (pull , 'created_at' )
137
137
138
138
#: The new head after the pull request
139
- self .head = PullDestination (pull ['head' ], 'Head' )
139
+ self .head = PullDestination (pull ['head' ], 'Head' , self )
140
140
141
141
#: The unique id of the pull request
142
142
self .id = self ._get_attribute (pull , 'id' )
@@ -175,7 +175,7 @@ def _update_attributes(self, pull):
175
175
176
176
#: :class:`User <github3.users.ShortUser>` object representing the
177
177
#: creator of the pull request
178
- self .user = users .ShortUser (pull ['user' ])
178
+ self .user = users .ShortUser (pull ['user' ], self )
179
179
180
180
# This is only present if the PR has been assigned.
181
181
#: :class:`User <github3.users.ShortUser>` object representing the
0 commit comments