mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 03:41:08 +00:00
Merge branch 'topic/PullRequest.assignee' into develop
This commit is contained in:
@@ -31,6 +31,11 @@ class PullRequest(GithubObject.GithubObject):
|
||||
self._completeIfNotSet(self._additions)
|
||||
return self._NoneIfNotSet(self._additions)
|
||||
|
||||
@property
|
||||
def assignee(self):
|
||||
self._completeIfNotSet(self._assignee)
|
||||
return self._NoneIfNotSet(self._assignee)
|
||||
|
||||
@property
|
||||
def base(self):
|
||||
self._completeIfNotSet(self._base)
|
||||
@@ -292,6 +297,7 @@ class PullRequest(GithubObject.GithubObject):
|
||||
|
||||
def _initAttributes(self):
|
||||
self._additions = GithubObject.NotSet
|
||||
self._assignee = GithubObject.NotSet
|
||||
self._base = GithubObject.NotSet
|
||||
self._body = GithubObject.NotSet
|
||||
self._changed_files = GithubObject.NotSet
|
||||
@@ -322,6 +328,9 @@ class PullRequest(GithubObject.GithubObject):
|
||||
if "additions" in attributes: # pragma no branch
|
||||
assert attributes["additions"] is None or isinstance(attributes["additions"], int), attributes["additions"]
|
||||
self._additions = attributes["additions"]
|
||||
if "assignee" in attributes: # pragma no branch
|
||||
assert attributes["assignee"] is None or isinstance(attributes["assignee"], dict), attributes["assignee"]
|
||||
self._assignee = None if attributes["assignee"] is None else NamedUser.NamedUser(self._requester, attributes["assignee"], completed=False)
|
||||
if "base" in attributes: # pragma no branch
|
||||
assert attributes["base"] is None or isinstance(attributes["base"], dict), attributes["base"]
|
||||
self._base = None if attributes["base"] is None else PullRequestPart.PullRequestPart(self._requester, attributes["base"], completed=False)
|
||||
|
||||
Reference in New Issue
Block a user