user.node_id missing (#1001)

'node_id' attribute was missing. Hence added the attribute using add_attribute script in AuthorizedUser  and NamedUser classes. 
This fixes issue #999 .
This commit is contained in:
Surya Teja
2019-01-10 20:49:52 +08:00
committed by Wan Liuyang
parent b51227681d
commit 10bacb486a
7 changed files with 28 additions and 3 deletions
+11
View File
@@ -59,6 +59,14 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
def __repr__(self):
return self.get__repr__({"login": self._login.value})
@property
def node_id(self):
"""
:type: string
"""
self._completeIfNotSet(self._node_id)
return self._node_id.value
def __hash__(self):
return hash((self.id, self.login))
@@ -605,6 +613,7 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
self._location = github.GithubObject.NotSet
self._login = github.GithubObject.NotSet
self._name = github.GithubObject.NotSet
self._node_id = github.GithubObject.NotSet
self._organizations_url = github.GithubObject.NotSet
self._owned_private_repos = github.GithubObject.NotSet
self._permissions = github.GithubObject.NotSet
@@ -668,6 +677,8 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
self._login = self._makeStringAttribute(attributes["login"])
if "name" in attributes: # pragma no branch
self._name = self._makeStringAttribute(attributes["name"])
if "node_id" in attributes: # pragma no branch
self._node_id = self._makeStringAttribute(attributes["node_id"])
if "organizations_url" in attributes: # pragma no branch
self._organizations_url = self._makeStringAttribute(attributes["organizations_url"])
if "owned_private_repos" in attributes: # pragma no branch