mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 03:41:08 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user