mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 11:51:10 +00:00
Add many missing attributes
This commit is contained in:
@@ -39,6 +39,7 @@ import github.UserKey
|
||||
import github.Issue
|
||||
import github.Event
|
||||
import github.Authorization
|
||||
import github.Notification
|
||||
|
||||
|
||||
class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
|
||||
@@ -110,6 +111,14 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._email)
|
||||
return self._NoneIfNotSet(self._email)
|
||||
|
||||
@property
|
||||
def events_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._events_url)
|
||||
return self._NoneIfNotSet(self._events_url)
|
||||
|
||||
@property
|
||||
def followers(self):
|
||||
"""
|
||||
@@ -118,6 +127,14 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._followers)
|
||||
return self._NoneIfNotSet(self._followers)
|
||||
|
||||
@property
|
||||
def followers_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._followers_url)
|
||||
return self._NoneIfNotSet(self._followers_url)
|
||||
|
||||
@property
|
||||
def following(self):
|
||||
"""
|
||||
@@ -126,6 +143,22 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._following)
|
||||
return self._NoneIfNotSet(self._following)
|
||||
|
||||
@property
|
||||
def following_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._following_url)
|
||||
return self._NoneIfNotSet(self._following_url)
|
||||
|
||||
@property
|
||||
def gists_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._gists_url)
|
||||
return self._NoneIfNotSet(self._gists_url)
|
||||
|
||||
@property
|
||||
def gravatar_id(self):
|
||||
"""
|
||||
@@ -182,6 +215,14 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._name)
|
||||
return self._NoneIfNotSet(self._name)
|
||||
|
||||
@property
|
||||
def organizations_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._organizations_url)
|
||||
return self._NoneIfNotSet(self._organizations_url)
|
||||
|
||||
@property
|
||||
def owned_private_repos(self):
|
||||
"""
|
||||
@@ -222,6 +263,46 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._public_repos)
|
||||
return self._NoneIfNotSet(self._public_repos)
|
||||
|
||||
@property
|
||||
def received_events_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._received_events_url)
|
||||
return self._NoneIfNotSet(self._received_events_url)
|
||||
|
||||
@property
|
||||
def repos_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._repos_url)
|
||||
return self._NoneIfNotSet(self._repos_url)
|
||||
|
||||
@property
|
||||
def site_admin(self):
|
||||
"""
|
||||
:type: bool
|
||||
"""
|
||||
self._completeIfNotSet(self._site_admin)
|
||||
return self._NoneIfNotSet(self._site_admin)
|
||||
|
||||
@property
|
||||
def starred_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._starred_url)
|
||||
return self._NoneIfNotSet(self._starred_url)
|
||||
|
||||
@property
|
||||
def subscriptions_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._subscriptions_url)
|
||||
return self._NoneIfNotSet(self._subscriptions_url)
|
||||
|
||||
@property
|
||||
def total_private_repos(self):
|
||||
"""
|
||||
@@ -238,6 +319,14 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._type)
|
||||
return self._NoneIfNotSet(self._type)
|
||||
|
||||
@property
|
||||
def updated_at(self):
|
||||
"""
|
||||
:type: datetime.datetime
|
||||
"""
|
||||
self._completeIfNotSet(self._updated_at)
|
||||
return self._NoneIfNotSet(self._updated_at)
|
||||
|
||||
@property
|
||||
def url(self):
|
||||
"""
|
||||
@@ -689,6 +778,8 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
|
||||
def get_notifications(self, all=github.GithubObject.NotSet, participating=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `GET /notifications <http://developer.github.com/v3/activity/notifications>`_
|
||||
:param all: bool
|
||||
:param participating: bool
|
||||
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Notification.Notification`
|
||||
"""
|
||||
|
||||
@@ -944,8 +1035,12 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
|
||||
self._created_at = github.GithubObject.NotSet
|
||||
self._disk_usage = github.GithubObject.NotSet
|
||||
self._email = github.GithubObject.NotSet
|
||||
self._events_url = github.GithubObject.NotSet
|
||||
self._followers = github.GithubObject.NotSet
|
||||
self._followers_url = github.GithubObject.NotSet
|
||||
self._following = github.GithubObject.NotSet
|
||||
self._following_url = github.GithubObject.NotSet
|
||||
self._gists_url = github.GithubObject.NotSet
|
||||
self._gravatar_id = github.GithubObject.NotSet
|
||||
self._hireable = github.GithubObject.NotSet
|
||||
self._html_url = github.GithubObject.NotSet
|
||||
@@ -953,13 +1048,20 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
|
||||
self._location = github.GithubObject.NotSet
|
||||
self._login = github.GithubObject.NotSet
|
||||
self._name = github.GithubObject.NotSet
|
||||
self._organizations_url = github.GithubObject.NotSet
|
||||
self._owned_private_repos = github.GithubObject.NotSet
|
||||
self._plan = github.GithubObject.NotSet
|
||||
self._private_gists = github.GithubObject.NotSet
|
||||
self._public_gists = github.GithubObject.NotSet
|
||||
self._public_repos = github.GithubObject.NotSet
|
||||
self._received_events_url = github.GithubObject.NotSet
|
||||
self._repos_url = github.GithubObject.NotSet
|
||||
self._site_admin = github.GithubObject.NotSet
|
||||
self._starred_url = github.GithubObject.NotSet
|
||||
self._subscriptions_url = github.GithubObject.NotSet
|
||||
self._total_private_repos = github.GithubObject.NotSet
|
||||
self._type = github.GithubObject.NotSet
|
||||
self._updated_at = github.GithubObject.NotSet
|
||||
self._url = github.GithubObject.NotSet
|
||||
|
||||
def _useAttributes(self, attributes):
|
||||
@@ -987,12 +1089,24 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
|
||||
if "email" in attributes: # pragma no branch
|
||||
assert attributes["email"] is None or isinstance(attributes["email"], (str, unicode)), attributes["email"]
|
||||
self._email = attributes["email"]
|
||||
if "events_url" in attributes: # pragma no branch
|
||||
assert attributes["events_url"] is None or isinstance(attributes["events_url"], (str, unicode)), attributes["events_url"]
|
||||
self._events_url = attributes["events_url"]
|
||||
if "followers" in attributes: # pragma no branch
|
||||
assert attributes["followers"] is None or isinstance(attributes["followers"], (int, long)), attributes["followers"]
|
||||
self._followers = attributes["followers"]
|
||||
if "followers_url" in attributes: # pragma no branch
|
||||
assert attributes["followers_url"] is None or isinstance(attributes["followers_url"], (str, unicode)), attributes["followers_url"]
|
||||
self._followers_url = attributes["followers_url"]
|
||||
if "following" in attributes: # pragma no branch
|
||||
assert attributes["following"] is None or isinstance(attributes["following"], (int, long)), attributes["following"]
|
||||
self._following = attributes["following"]
|
||||
if "following_url" in attributes: # pragma no branch
|
||||
assert attributes["following_url"] is None or isinstance(attributes["following_url"], (str, unicode)), attributes["following_url"]
|
||||
self._following_url = attributes["following_url"]
|
||||
if "gists_url" in attributes: # pragma no branch
|
||||
assert attributes["gists_url"] is None or isinstance(attributes["gists_url"], (str, unicode)), attributes["gists_url"]
|
||||
self._gists_url = attributes["gists_url"]
|
||||
if "gravatar_id" in attributes: # pragma no branch
|
||||
assert attributes["gravatar_id"] is None or isinstance(attributes["gravatar_id"], (str, unicode)), attributes["gravatar_id"]
|
||||
self._gravatar_id = attributes["gravatar_id"]
|
||||
@@ -1014,6 +1128,9 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
|
||||
if "name" in attributes: # pragma no branch
|
||||
assert attributes["name"] is None or isinstance(attributes["name"], (str, unicode)), attributes["name"]
|
||||
self._name = attributes["name"]
|
||||
if "organizations_url" in attributes: # pragma no branch
|
||||
assert attributes["organizations_url"] is None or isinstance(attributes["organizations_url"], (str, unicode)), attributes["organizations_url"]
|
||||
self._organizations_url = attributes["organizations_url"]
|
||||
if "owned_private_repos" in attributes: # pragma no branch
|
||||
assert attributes["owned_private_repos"] is None or isinstance(attributes["owned_private_repos"], (int, long)), attributes["owned_private_repos"]
|
||||
self._owned_private_repos = attributes["owned_private_repos"]
|
||||
@@ -1029,12 +1146,30 @@ class AuthenticatedUser(github.GithubObject.CompletableGithubObject):
|
||||
if "public_repos" in attributes: # pragma no branch
|
||||
assert attributes["public_repos"] is None or isinstance(attributes["public_repos"], (int, long)), attributes["public_repos"]
|
||||
self._public_repos = attributes["public_repos"]
|
||||
if "received_events_url" in attributes: # pragma no branch
|
||||
assert attributes["received_events_url"] is None or isinstance(attributes["received_events_url"], (str, unicode)), attributes["received_events_url"]
|
||||
self._received_events_url = attributes["received_events_url"]
|
||||
if "repos_url" in attributes: # pragma no branch
|
||||
assert attributes["repos_url"] is None or isinstance(attributes["repos_url"], (str, unicode)), attributes["repos_url"]
|
||||
self._repos_url = attributes["repos_url"]
|
||||
if "site_admin" in attributes: # pragma no branch
|
||||
assert attributes["site_admin"] is None or isinstance(attributes["site_admin"], bool), attributes["site_admin"]
|
||||
self._site_admin = attributes["site_admin"]
|
||||
if "starred_url" in attributes: # pragma no branch
|
||||
assert attributes["starred_url"] is None or isinstance(attributes["starred_url"], (str, unicode)), attributes["starred_url"]
|
||||
self._starred_url = attributes["starred_url"]
|
||||
if "subscriptions_url" in attributes: # pragma no branch
|
||||
assert attributes["subscriptions_url"] is None or isinstance(attributes["subscriptions_url"], (str, unicode)), attributes["subscriptions_url"]
|
||||
self._subscriptions_url = attributes["subscriptions_url"]
|
||||
if "total_private_repos" in attributes: # pragma no branch
|
||||
assert attributes["total_private_repos"] is None or isinstance(attributes["total_private_repos"], (int, long)), attributes["total_private_repos"]
|
||||
self._total_private_repos = attributes["total_private_repos"]
|
||||
if "type" in attributes: # pragma no branch
|
||||
assert attributes["type"] is None or isinstance(attributes["type"], (str, unicode)), attributes["type"]
|
||||
self._type = attributes["type"]
|
||||
if "updated_at" in attributes: # pragma no branch
|
||||
assert attributes["updated_at"] is None or isinstance(attributes["updated_at"], (str, unicode)), attributes["updated_at"]
|
||||
self._updated_at = self._parseDatetime(attributes["updated_at"])
|
||||
if "url" in attributes: # pragma no branch
|
||||
assert attributes["url"] is None or isinstance(attributes["url"], (str, unicode)), attributes["url"]
|
||||
self._url = attributes["url"]
|
||||
|
||||
@@ -49,6 +49,14 @@ class Commit(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._author)
|
||||
return self._NoneIfNotSet(self._author)
|
||||
|
||||
@property
|
||||
def comments_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._comments_url)
|
||||
return self._NoneIfNotSet(self._comments_url)
|
||||
|
||||
@property
|
||||
def commit(self):
|
||||
"""
|
||||
@@ -73,6 +81,14 @@ class Commit(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._files)
|
||||
return self._NoneIfNotSet(self._files)
|
||||
|
||||
@property
|
||||
def html_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._html_url)
|
||||
return self._NoneIfNotSet(self._html_url)
|
||||
|
||||
@property
|
||||
def parents(self):
|
||||
"""
|
||||
@@ -189,9 +205,11 @@ class Commit(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def _initAttributes(self):
|
||||
self._author = github.GithubObject.NotSet
|
||||
self._comments_url = github.GithubObject.NotSet
|
||||
self._commit = github.GithubObject.NotSet
|
||||
self._committer = github.GithubObject.NotSet
|
||||
self._files = github.GithubObject.NotSet
|
||||
self._html_url = github.GithubObject.NotSet
|
||||
self._parents = github.GithubObject.NotSet
|
||||
self._sha = github.GithubObject.NotSet
|
||||
self._stats = github.GithubObject.NotSet
|
||||
@@ -201,6 +219,9 @@ class Commit(github.GithubObject.CompletableGithubObject):
|
||||
if "author" in attributes: # pragma no branch
|
||||
assert attributes["author"] is None or isinstance(attributes["author"], dict), attributes["author"]
|
||||
self._author = None if attributes["author"] is None else github.NamedUser.NamedUser(self._requester, self._headers, attributes["author"], completed=False)
|
||||
if "comments_url" in attributes: # pragma no branch
|
||||
assert attributes["comments_url"] is None or isinstance(attributes["comments_url"], (str, unicode)), attributes["comments_url"]
|
||||
self._comments_url = attributes["comments_url"]
|
||||
if "commit" in attributes: # pragma no branch
|
||||
assert attributes["commit"] is None or isinstance(attributes["commit"], dict), attributes["commit"]
|
||||
self._commit = None if attributes["commit"] is None else github.GitCommit.GitCommit(self._requester, self._headers, attributes["commit"], completed=False)
|
||||
@@ -213,6 +234,9 @@ class Commit(github.GithubObject.CompletableGithubObject):
|
||||
github.File.File(self._requester, self._headers, element, completed=False)
|
||||
for element in attributes["files"]
|
||||
]
|
||||
if "html_url" in attributes: # pragma no branch
|
||||
assert attributes["html_url"] is None or isinstance(attributes["html_url"], (str, unicode)), attributes["html_url"]
|
||||
self._html_url = attributes["html_url"]
|
||||
if "parents" in attributes: # pragma no branch
|
||||
assert attributes["parents"] is None or all(isinstance(element, dict) for element in attributes["parents"]), attributes["parents"]
|
||||
self._parents = None if attributes["parents"] is None else [
|
||||
|
||||
@@ -83,6 +83,13 @@ class CommitStatus(github.GithubObject.NonCompletableGithubObject):
|
||||
"""
|
||||
return self._NoneIfNotSet(self._updated_at)
|
||||
|
||||
@property
|
||||
def url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
return self._NoneIfNotSet(self._url)
|
||||
|
||||
def _initAttributes(self):
|
||||
self._created_at = github.GithubObject.NotSet
|
||||
self._creator = github.GithubObject.NotSet
|
||||
@@ -91,6 +98,7 @@ class CommitStatus(github.GithubObject.NonCompletableGithubObject):
|
||||
self._state = github.GithubObject.NotSet
|
||||
self._target_url = github.GithubObject.NotSet
|
||||
self._updated_at = github.GithubObject.NotSet
|
||||
self._url = github.GithubObject.NotSet
|
||||
|
||||
def _useAttributes(self, attributes):
|
||||
if "created_at" in attributes: # pragma no branch
|
||||
@@ -114,3 +122,6 @@ class CommitStatus(github.GithubObject.NonCompletableGithubObject):
|
||||
if "updated_at" in attributes: # pragma no branch
|
||||
assert attributes["updated_at"] is None or isinstance(attributes["updated_at"], (str, unicode)), attributes["updated_at"]
|
||||
self._updated_at = self._parseDatetime(attributes["updated_at"])
|
||||
if "url" in attributes: # pragma no branch
|
||||
assert attributes["url"] is None or isinstance(attributes["url"], (str, unicode)), attributes["url"]
|
||||
self._url = attributes["url"]
|
||||
|
||||
@@ -91,6 +91,14 @@ class Comparison(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._html_url)
|
||||
return self._NoneIfNotSet(self._html_url)
|
||||
|
||||
@property
|
||||
def merge_base_commit(self):
|
||||
"""
|
||||
:type: :class:`github.Commit.Commit`
|
||||
"""
|
||||
self._completeIfNotSet(self._merge_base_commit)
|
||||
return self._NoneIfNotSet(self._merge_base_commit)
|
||||
|
||||
@property
|
||||
def patch_url(self):
|
||||
"""
|
||||
@@ -139,6 +147,7 @@ class Comparison(github.GithubObject.CompletableGithubObject):
|
||||
self._diff_url = github.GithubObject.NotSet
|
||||
self._files = github.GithubObject.NotSet
|
||||
self._html_url = github.GithubObject.NotSet
|
||||
self._merge_base_commit = github.GithubObject.NotSet
|
||||
self._patch_url = github.GithubObject.NotSet
|
||||
self._permalink_url = github.GithubObject.NotSet
|
||||
self._status = github.GithubObject.NotSet
|
||||
@@ -173,6 +182,9 @@ class Comparison(github.GithubObject.CompletableGithubObject):
|
||||
if "html_url" in attributes: # pragma no branch
|
||||
assert attributes["html_url"] is None or isinstance(attributes["html_url"], (str, unicode)), attributes["html_url"]
|
||||
self._html_url = attributes["html_url"]
|
||||
if "merge_base_commit" in attributes: # pragma no branch
|
||||
assert attributes["merge_base_commit"] is None or isinstance(attributes["merge_base_commit"], dict), attributes["merge_base_commit"]
|
||||
self._merge_base_commit = None if attributes["merge_base_commit"] is None else github.Commit.Commit(self._requester, self._headers, attributes["merge_base_commit"], completed=False)
|
||||
if "patch_url" in attributes: # pragma no branch
|
||||
assert attributes["patch_url"] is None or isinstance(attributes["patch_url"], (str, unicode)), attributes["patch_url"]
|
||||
self._patch_url = attributes["patch_url"]
|
||||
|
||||
@@ -48,6 +48,22 @@ class ContentFile(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._encoding)
|
||||
return self._NoneIfNotSet(self._encoding)
|
||||
|
||||
@property
|
||||
def git_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._git_url)
|
||||
return self._NoneIfNotSet(self._git_url)
|
||||
|
||||
@property
|
||||
def html_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._html_url)
|
||||
return self._NoneIfNotSet(self._html_url)
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""
|
||||
@@ -99,6 +115,8 @@ class ContentFile(github.GithubObject.CompletableGithubObject):
|
||||
def _initAttributes(self):
|
||||
self._content = github.GithubObject.NotSet
|
||||
self._encoding = github.GithubObject.NotSet
|
||||
self._git_url = github.GithubObject.NotSet
|
||||
self._html_url = github.GithubObject.NotSet
|
||||
self._name = github.GithubObject.NotSet
|
||||
self._path = github.GithubObject.NotSet
|
||||
self._sha = github.GithubObject.NotSet
|
||||
@@ -112,6 +130,12 @@ class ContentFile(github.GithubObject.CompletableGithubObject):
|
||||
if "encoding" in attributes: # pragma no branch
|
||||
assert attributes["encoding"] is None or isinstance(attributes["encoding"], (str, unicode)), attributes["encoding"]
|
||||
self._encoding = attributes["encoding"]
|
||||
if "git_url" in attributes: # pragma no branch
|
||||
assert attributes["git_url"] is None or isinstance(attributes["git_url"], (str, unicode)), attributes["git_url"]
|
||||
self._git_url = attributes["git_url"]
|
||||
if "html_url" in attributes: # pragma no branch
|
||||
assert attributes["html_url"] is None or isinstance(attributes["html_url"], (str, unicode)), attributes["html_url"]
|
||||
self._html_url = attributes["html_url"]
|
||||
if "name" in attributes: # pragma no branch
|
||||
assert attributes["name"] is None or isinstance(attributes["name"], (str, unicode)), attributes["name"]
|
||||
self._name = attributes["name"]
|
||||
|
||||
@@ -53,6 +53,13 @@ class File(github.GithubObject.NonCompletableGithubObject):
|
||||
"""
|
||||
return self._NoneIfNotSet(self._changes)
|
||||
|
||||
@property
|
||||
def contents_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
return self._NoneIfNotSet(self._contents_url)
|
||||
|
||||
@property
|
||||
def deletions(self):
|
||||
"""
|
||||
@@ -99,6 +106,7 @@ class File(github.GithubObject.NonCompletableGithubObject):
|
||||
self._additions = github.GithubObject.NotSet
|
||||
self._blob_url = github.GithubObject.NotSet
|
||||
self._changes = github.GithubObject.NotSet
|
||||
self._contents_url = github.GithubObject.NotSet
|
||||
self._deletions = github.GithubObject.NotSet
|
||||
self._filename = github.GithubObject.NotSet
|
||||
self._patch = github.GithubObject.NotSet
|
||||
@@ -116,6 +124,9 @@ class File(github.GithubObject.NonCompletableGithubObject):
|
||||
if "changes" in attributes: # pragma no branch
|
||||
assert attributes["changes"] is None or isinstance(attributes["changes"], (int, long)), attributes["changes"]
|
||||
self._changes = attributes["changes"]
|
||||
if "contents_url" in attributes: # pragma no branch
|
||||
assert attributes["contents_url"] is None or isinstance(attributes["contents_url"], (str, unicode)), attributes["contents_url"]
|
||||
self._contents_url = attributes["contents_url"]
|
||||
if "deletions" in attributes: # pragma no branch
|
||||
assert attributes["deletions"] is None or isinstance(attributes["deletions"], (int, long)), attributes["deletions"]
|
||||
self._deletions = attributes["deletions"]
|
||||
|
||||
+37
-1
@@ -47,6 +47,22 @@ class Gist(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._comments)
|
||||
return self._NoneIfNotSet(self._comments)
|
||||
|
||||
@property
|
||||
def comments_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._comments_url)
|
||||
return self._NoneIfNotSet(self._comments_url)
|
||||
|
||||
@property
|
||||
def commits_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._commits_url)
|
||||
return self._NoneIfNotSet(self._commits_url)
|
||||
|
||||
@property
|
||||
def created_at(self):
|
||||
"""
|
||||
@@ -87,6 +103,14 @@ class Gist(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._forks)
|
||||
return self._NoneIfNotSet(self._forks)
|
||||
|
||||
@property
|
||||
def forks_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._forks_url)
|
||||
return self._NoneIfNotSet(self._forks_url)
|
||||
|
||||
@property
|
||||
def git_pull_url(self):
|
||||
"""
|
||||
@@ -276,11 +300,14 @@ class Gist(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def _initAttributes(self):
|
||||
self._comments = github.GithubObject.NotSet
|
||||
self._comments_url = github.GithubObject.NotSet
|
||||
self._commits_url = github.GithubObject.NotSet
|
||||
self._created_at = github.GithubObject.NotSet
|
||||
self._description = github.GithubObject.NotSet
|
||||
self._files = github.GithubObject.NotSet
|
||||
self._fork_of = github.GithubObject.NotSet
|
||||
self._forks = github.GithubObject.NotSet
|
||||
self._forks_url = github.GithubObject.NotSet
|
||||
self._git_pull_url = github.GithubObject.NotSet
|
||||
self._git_push_url = github.GithubObject.NotSet
|
||||
self._history = github.GithubObject.NotSet
|
||||
@@ -295,6 +322,12 @@ class Gist(github.GithubObject.CompletableGithubObject):
|
||||
if "comments" in attributes: # pragma no branch
|
||||
assert attributes["comments"] is None or isinstance(attributes["comments"], (int, long)), attributes["comments"]
|
||||
self._comments = attributes["comments"]
|
||||
if "comments_url" in attributes: # pragma no branch
|
||||
assert attributes["comments_url"] is None or isinstance(attributes["comments_url"], (str, unicode)), attributes["comments_url"]
|
||||
self._comments_url = attributes["comments_url"]
|
||||
if "commits_url" in attributes: # pragma no branch
|
||||
assert attributes["commits_url"] is None or isinstance(attributes["commits_url"], (str, unicode)), attributes["commits_url"]
|
||||
self._commits_url = attributes["commits_url"]
|
||||
if "created_at" in attributes: # pragma no branch
|
||||
assert attributes["created_at"] is None or isinstance(attributes["created_at"], (str, unicode)), attributes["created_at"]
|
||||
self._created_at = self._parseDatetime(attributes["created_at"])
|
||||
@@ -313,9 +346,12 @@ class Gist(github.GithubObject.CompletableGithubObject):
|
||||
if "forks" in attributes: # pragma no branch
|
||||
assert attributes["forks"] is None or all(isinstance(element, dict) for element in attributes["forks"]), attributes["forks"]
|
||||
self._forks = None if attributes["forks"] is None else [
|
||||
Gist(self._requester, element, completed=False)
|
||||
Gist(self._requester, self._headers, element, completed=False)
|
||||
for element in attributes["forks"]
|
||||
]
|
||||
if "forks_url" in attributes: # pragma no branch
|
||||
assert attributes["forks_url"] is None or isinstance(attributes["forks_url"], (str, unicode)), attributes["forks_url"]
|
||||
self._forks_url = attributes["forks_url"]
|
||||
if "git_pull_url" in attributes: # pragma no branch
|
||||
assert attributes["git_pull_url"] is None or isinstance(attributes["git_pull_url"], (str, unicode)), attributes["git_pull_url"]
|
||||
self._git_pull_url = attributes["git_pull_url"]
|
||||
|
||||
@@ -67,12 +67,20 @@ class GistFile(github.GithubObject.NonCompletableGithubObject):
|
||||
"""
|
||||
return self._NoneIfNotSet(self._size)
|
||||
|
||||
@property
|
||||
def type(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
return self._NoneIfNotSet(self._type)
|
||||
|
||||
def _initAttributes(self):
|
||||
self._content = github.GithubObject.NotSet
|
||||
self._filename = github.GithubObject.NotSet
|
||||
self._language = github.GithubObject.NotSet
|
||||
self._raw_url = github.GithubObject.NotSet
|
||||
self._size = github.GithubObject.NotSet
|
||||
self._type = github.GithubObject.NotSet
|
||||
|
||||
def _useAttributes(self, attributes):
|
||||
if "content" in attributes: # pragma no branch
|
||||
@@ -90,3 +98,6 @@ class GistFile(github.GithubObject.NonCompletableGithubObject):
|
||||
if "size" in attributes: # pragma no branch
|
||||
assert attributes["size"] is None or isinstance(attributes["size"], (int, long)), attributes["size"]
|
||||
self._size = attributes["size"]
|
||||
if "type" in attributes: # pragma no branch
|
||||
assert attributes["type"] is None or isinstance(attributes["type"], (str, unicode)), attributes["type"]
|
||||
self._type = attributes["type"]
|
||||
|
||||
@@ -28,6 +28,7 @@ import github.GithubObject
|
||||
|
||||
import github.NamedUser
|
||||
import github.CommitStats
|
||||
import github.Gist
|
||||
|
||||
|
||||
class GistHistoryState(github.GithubObject.CompletableGithubObject):
|
||||
@@ -43,6 +44,30 @@ class GistHistoryState(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._change_status)
|
||||
return self._NoneIfNotSet(self._change_status)
|
||||
|
||||
@property
|
||||
def comments(self):
|
||||
"""
|
||||
:type: integer
|
||||
"""
|
||||
self._completeIfNotSet(self._comments)
|
||||
return self._NoneIfNotSet(self._comments)
|
||||
|
||||
@property
|
||||
def comments_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._comments_url)
|
||||
return self._NoneIfNotSet(self._comments_url)
|
||||
|
||||
@property
|
||||
def commits_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._commits_url)
|
||||
return self._NoneIfNotSet(self._commits_url)
|
||||
|
||||
@property
|
||||
def committed_at(self):
|
||||
"""
|
||||
@@ -51,6 +76,102 @@ class GistHistoryState(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._committed_at)
|
||||
return self._NoneIfNotSet(self._committed_at)
|
||||
|
||||
@property
|
||||
def created_at(self):
|
||||
"""
|
||||
:type: datetime.datetime
|
||||
"""
|
||||
self._completeIfNotSet(self._created_at)
|
||||
return self._NoneIfNotSet(self._created_at)
|
||||
|
||||
@property
|
||||
def description(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._description)
|
||||
return self._NoneIfNotSet(self._description)
|
||||
|
||||
@property
|
||||
def files(self):
|
||||
"""
|
||||
:type: dict of string to :class:`github.GistFile.GistFile`
|
||||
"""
|
||||
self._completeIfNotSet(self._files)
|
||||
return self._NoneIfNotSet(self._files)
|
||||
|
||||
@property
|
||||
def forks(self):
|
||||
"""
|
||||
:type: list of :class:`github.Gist.Gist`
|
||||
"""
|
||||
self._completeIfNotSet(self._forks)
|
||||
return self._NoneIfNotSet(self._forks)
|
||||
|
||||
@property
|
||||
def forks_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._forks_url)
|
||||
return self._NoneIfNotSet(self._forks_url)
|
||||
|
||||
@property
|
||||
def git_pull_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._git_pull_url)
|
||||
return self._NoneIfNotSet(self._git_pull_url)
|
||||
|
||||
@property
|
||||
def git_push_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._git_push_url)
|
||||
return self._NoneIfNotSet(self._git_push_url)
|
||||
|
||||
@property
|
||||
def history(self):
|
||||
"""
|
||||
:type: list of :class:`GistHistoryState`
|
||||
"""
|
||||
self._completeIfNotSet(self._history)
|
||||
return self._NoneIfNotSet(self._history)
|
||||
|
||||
@property
|
||||
def html_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._html_url)
|
||||
return self._NoneIfNotSet(self._html_url)
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._id)
|
||||
return self._NoneIfNotSet(self._id)
|
||||
|
||||
@property
|
||||
def public(self):
|
||||
"""
|
||||
:type: bool
|
||||
"""
|
||||
self._completeIfNotSet(self._public)
|
||||
return self._NoneIfNotSet(self._public)
|
||||
|
||||
@property
|
||||
def updated_at(self):
|
||||
"""
|
||||
:type: datetime.datetime
|
||||
"""
|
||||
self._completeIfNotSet(self._updated_at)
|
||||
return self._NoneIfNotSet(self._updated_at)
|
||||
|
||||
@property
|
||||
def url(self):
|
||||
"""
|
||||
@@ -77,7 +198,22 @@ class GistHistoryState(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def _initAttributes(self):
|
||||
self._change_status = github.GithubObject.NotSet
|
||||
self._comments = github.GithubObject.NotSet
|
||||
self._comments_url = github.GithubObject.NotSet
|
||||
self._commits_url = github.GithubObject.NotSet
|
||||
self._committed_at = github.GithubObject.NotSet
|
||||
self._created_at = github.GithubObject.NotSet
|
||||
self._description = github.GithubObject.NotSet
|
||||
self._files = github.GithubObject.NotSet
|
||||
self._forks = github.GithubObject.NotSet
|
||||
self._forks_url = github.GithubObject.NotSet
|
||||
self._git_pull_url = github.GithubObject.NotSet
|
||||
self._git_push_url = github.GithubObject.NotSet
|
||||
self._history = github.GithubObject.NotSet
|
||||
self._html_url = github.GithubObject.NotSet
|
||||
self._id = github.GithubObject.NotSet
|
||||
self._public = github.GithubObject.NotSet
|
||||
self._updated_at = github.GithubObject.NotSet
|
||||
self._url = github.GithubObject.NotSet
|
||||
self._user = github.GithubObject.NotSet
|
||||
self._version = github.GithubObject.NotSet
|
||||
@@ -86,9 +222,63 @@ class GistHistoryState(github.GithubObject.CompletableGithubObject):
|
||||
if "change_status" in attributes: # pragma no branch
|
||||
assert attributes["change_status"] is None or isinstance(attributes["change_status"], dict), attributes["change_status"]
|
||||
self._change_status = None if attributes["change_status"] is None else github.CommitStats.CommitStats(self._requester, self._headers, attributes["change_status"], completed=False)
|
||||
if "comments" in attributes: # pragma no branch
|
||||
assert attributes["comments"] is None or isinstance(attributes["comments"], (int, long)), attributes["comments"]
|
||||
self._comments = attributes["comments"]
|
||||
if "comments_url" in attributes: # pragma no branch
|
||||
assert attributes["comments_url"] is None or isinstance(attributes["comments_url"], (str, unicode)), attributes["comments_url"]
|
||||
self._comments_url = attributes["comments_url"]
|
||||
if "commits_url" in attributes: # pragma no branch
|
||||
assert attributes["commits_url"] is None or isinstance(attributes["commits_url"], (str, unicode)), attributes["commits_url"]
|
||||
self._commits_url = attributes["commits_url"]
|
||||
if "committed_at" in attributes: # pragma no branch
|
||||
assert attributes["committed_at"] is None or isinstance(attributes["committed_at"], (str, unicode)), attributes["committed_at"]
|
||||
self._committed_at = self._parseDatetime(attributes["committed_at"])
|
||||
if "created_at" in attributes: # pragma no branch
|
||||
assert attributes["created_at"] is None or isinstance(attributes["created_at"], (str, unicode)), attributes["created_at"]
|
||||
self._created_at = self._parseDatetime(attributes["created_at"])
|
||||
if "description" in attributes: # pragma no branch
|
||||
assert attributes["description"] is None or isinstance(attributes["description"], (str, unicode)), attributes["description"]
|
||||
self._description = attributes["description"]
|
||||
if "files" in attributes: # pragma no branch
|
||||
assert attributes["files"] is None or all(isinstance(element, dict) for element in attributes["files"].itervalues()), attributes["files"]
|
||||
self._files = None if attributes["files"] is None else dict(
|
||||
(key, github.GistFile.GistFile(self._requester, self._headers, element, completed=False))
|
||||
for key, element in attributes["files"].iteritems()
|
||||
)
|
||||
if "forks" in attributes: # pragma no branch
|
||||
assert attributes["forks"] is None or all(isinstance(element, dict) for element in attributes["forks"]), attributes["forks"]
|
||||
self._forks = None if attributes["forks"] is None else [
|
||||
github.Gist.Gist(self._requester, self._headers, element, completed=False)
|
||||
for element in attributes["forks"]
|
||||
]
|
||||
if "forks_url" in attributes: # pragma no branch
|
||||
assert attributes["forks_url"] is None or isinstance(attributes["forks_url"], (str, unicode)), attributes["forks_url"]
|
||||
self._forks_url = attributes["forks_url"]
|
||||
if "git_pull_url" in attributes: # pragma no branch
|
||||
assert attributes["git_pull_url"] is None or isinstance(attributes["git_pull_url"], (str, unicode)), attributes["git_pull_url"]
|
||||
self._git_pull_url = attributes["git_pull_url"]
|
||||
if "git_push_url" in attributes: # pragma no branch
|
||||
assert attributes["git_push_url"] is None or isinstance(attributes["git_push_url"], (str, unicode)), attributes["git_push_url"]
|
||||
self._git_push_url = attributes["git_push_url"]
|
||||
if "history" in attributes: # pragma no branch
|
||||
assert attributes["history"] is None or all(isinstance(element, dict) for element in attributes["history"]), attributes["history"]
|
||||
self._history = None if attributes["history"] is None else [
|
||||
GistHistoryState(self._requester, self._headers, element, completed=False)
|
||||
for element in attributes["history"]
|
||||
]
|
||||
if "html_url" in attributes: # pragma no branch
|
||||
assert attributes["html_url"] is None or isinstance(attributes["html_url"], (str, unicode)), attributes["html_url"]
|
||||
self._html_url = attributes["html_url"]
|
||||
if "id" in attributes: # pragma no branch
|
||||
assert attributes["id"] is None or isinstance(attributes["id"], (str, unicode)), attributes["id"]
|
||||
self._id = attributes["id"]
|
||||
if "public" in attributes: # pragma no branch
|
||||
assert attributes["public"] is None or isinstance(attributes["public"], bool), attributes["public"]
|
||||
self._public = attributes["public"]
|
||||
if "updated_at" in attributes: # pragma no branch
|
||||
assert attributes["updated_at"] is None or isinstance(attributes["updated_at"], (str, unicode)), attributes["updated_at"]
|
||||
self._updated_at = self._parseDatetime(attributes["updated_at"])
|
||||
if "url" in attributes: # pragma no branch
|
||||
assert attributes["url"] is None or isinstance(attributes["url"], (str, unicode)), attributes["url"]
|
||||
self._url = attributes["url"]
|
||||
|
||||
@@ -51,6 +51,14 @@ class GitCommit(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._committer)
|
||||
return self._NoneIfNotSet(self._committer)
|
||||
|
||||
@property
|
||||
def html_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._html_url)
|
||||
return self._NoneIfNotSet(self._html_url)
|
||||
|
||||
@property
|
||||
def message(self):
|
||||
"""
|
||||
@@ -98,6 +106,7 @@ class GitCommit(github.GithubObject.CompletableGithubObject):
|
||||
def _initAttributes(self):
|
||||
self._author = github.GithubObject.NotSet
|
||||
self._committer = github.GithubObject.NotSet
|
||||
self._html_url = github.GithubObject.NotSet
|
||||
self._message = github.GithubObject.NotSet
|
||||
self._parents = github.GithubObject.NotSet
|
||||
self._sha = github.GithubObject.NotSet
|
||||
@@ -111,6 +120,9 @@ class GitCommit(github.GithubObject.CompletableGithubObject):
|
||||
if "committer" in attributes: # pragma no branch
|
||||
assert attributes["committer"] is None or isinstance(attributes["committer"], dict), attributes["committer"]
|
||||
self._committer = None if attributes["committer"] is None else github.GitAuthor.GitAuthor(self._requester, self._headers, attributes["committer"], completed=False)
|
||||
if "html_url" in attributes: # pragma no branch
|
||||
assert attributes["html_url"] is None or isinstance(attributes["html_url"], (str, unicode)), attributes["html_url"]
|
||||
self._html_url = attributes["html_url"]
|
||||
if "message" in attributes: # pragma no branch
|
||||
assert attributes["message"] is None or isinstance(attributes["message"], (str, unicode)), attributes["message"]
|
||||
self._message = attributes["message"]
|
||||
|
||||
@@ -90,6 +90,14 @@ class Hook(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._name)
|
||||
return self._NoneIfNotSet(self._name)
|
||||
|
||||
@property
|
||||
def test_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._test_url)
|
||||
return self._NoneIfNotSet(self._test_url)
|
||||
|
||||
@property
|
||||
def updated_at(self):
|
||||
"""
|
||||
@@ -170,6 +178,7 @@ class Hook(github.GithubObject.CompletableGithubObject):
|
||||
self._id = github.GithubObject.NotSet
|
||||
self._last_response = github.GithubObject.NotSet
|
||||
self._name = github.GithubObject.NotSet
|
||||
self._test_url = github.GithubObject.NotSet
|
||||
self._updated_at = github.GithubObject.NotSet
|
||||
self._url = github.GithubObject.NotSet
|
||||
|
||||
@@ -195,6 +204,9 @@ class Hook(github.GithubObject.CompletableGithubObject):
|
||||
if "name" in attributes: # pragma no branch
|
||||
assert attributes["name"] is None or isinstance(attributes["name"], (str, unicode)), attributes["name"]
|
||||
self._name = attributes["name"]
|
||||
if "test_url" in attributes: # pragma no branch
|
||||
assert attributes["test_url"] is None or isinstance(attributes["test_url"], (str, unicode)), attributes["test_url"]
|
||||
self._test_url = attributes["test_url"]
|
||||
if "updated_at" in attributes: # pragma no branch
|
||||
assert attributes["updated_at"] is None or isinstance(attributes["updated_at"], (str, unicode)), attributes["updated_at"]
|
||||
self._updated_at = self._parseDatetime(attributes["updated_at"])
|
||||
|
||||
@@ -84,6 +84,14 @@ class Issue(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._comments)
|
||||
return self._NoneIfNotSet(self._comments)
|
||||
|
||||
@property
|
||||
def comments_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._comments_url)
|
||||
return self._NoneIfNotSet(self._comments_url)
|
||||
|
||||
@property
|
||||
def created_at(self):
|
||||
"""
|
||||
@@ -92,6 +100,14 @@ class Issue(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._created_at)
|
||||
return self._NoneIfNotSet(self._created_at)
|
||||
|
||||
@property
|
||||
def events_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._events_url)
|
||||
return self._NoneIfNotSet(self._events_url)
|
||||
|
||||
@property
|
||||
def html_url(self):
|
||||
"""
|
||||
@@ -116,6 +132,14 @@ class Issue(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._labels)
|
||||
return self._NoneIfNotSet(self._labels)
|
||||
|
||||
@property
|
||||
def labels_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._labels_url)
|
||||
return self._NoneIfNotSet(self._labels_url)
|
||||
|
||||
@property
|
||||
def milestone(self):
|
||||
"""
|
||||
@@ -355,10 +379,13 @@ class Issue(github.GithubObject.CompletableGithubObject):
|
||||
self._closed_at = github.GithubObject.NotSet
|
||||
self._closed_by = github.GithubObject.NotSet
|
||||
self._comments = github.GithubObject.NotSet
|
||||
self._comments_url = github.GithubObject.NotSet
|
||||
self._created_at = github.GithubObject.NotSet
|
||||
self._events_url = github.GithubObject.NotSet
|
||||
self._html_url = github.GithubObject.NotSet
|
||||
self._id = github.GithubObject.NotSet
|
||||
self._labels = github.GithubObject.NotSet
|
||||
self._labels_url = github.GithubObject.NotSet
|
||||
self._milestone = github.GithubObject.NotSet
|
||||
self._number = github.GithubObject.NotSet
|
||||
self._pull_request = github.GithubObject.NotSet
|
||||
@@ -385,9 +412,15 @@ class Issue(github.GithubObject.CompletableGithubObject):
|
||||
if "comments" in attributes: # pragma no branch
|
||||
assert attributes["comments"] is None or isinstance(attributes["comments"], (int, long)), attributes["comments"]
|
||||
self._comments = attributes["comments"]
|
||||
if "comments_url" in attributes: # pragma no branch
|
||||
assert attributes["comments_url"] is None or isinstance(attributes["comments_url"], (str, unicode)), attributes["comments_url"]
|
||||
self._comments_url = attributes["comments_url"]
|
||||
if "created_at" in attributes: # pragma no branch
|
||||
assert attributes["created_at"] is None or isinstance(attributes["created_at"], (str, unicode)), attributes["created_at"]
|
||||
self._created_at = self._parseDatetime(attributes["created_at"])
|
||||
if "events_url" in attributes: # pragma no branch
|
||||
assert attributes["events_url"] is None or isinstance(attributes["events_url"], (str, unicode)), attributes["events_url"]
|
||||
self._events_url = attributes["events_url"]
|
||||
if "html_url" in attributes: # pragma no branch
|
||||
assert attributes["html_url"] is None or isinstance(attributes["html_url"], (str, unicode)), attributes["html_url"]
|
||||
self._html_url = attributes["html_url"]
|
||||
@@ -400,6 +433,9 @@ class Issue(github.GithubObject.CompletableGithubObject):
|
||||
github.Label.Label(self._requester, self._headers, element, completed=False)
|
||||
for element in attributes["labels"]
|
||||
]
|
||||
if "labels_url" in attributes: # pragma no branch
|
||||
assert attributes["labels_url"] is None or isinstance(attributes["labels_url"], (str, unicode)), attributes["labels_url"]
|
||||
self._labels_url = attributes["labels_url"]
|
||||
if "milestone" in attributes: # pragma no branch
|
||||
assert attributes["milestone"] is None or isinstance(attributes["milestone"], dict), attributes["milestone"]
|
||||
self._milestone = None if attributes["milestone"] is None else github.Milestone.Milestone(self._requester, self._headers, attributes["milestone"], completed=False)
|
||||
|
||||
@@ -59,6 +59,14 @@ class IssueComment(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._id)
|
||||
return self._NoneIfNotSet(self._id)
|
||||
|
||||
@property
|
||||
def issue_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._issue_url)
|
||||
return self._NoneIfNotSet(self._issue_url)
|
||||
|
||||
@property
|
||||
def updated_at(self):
|
||||
"""
|
||||
@@ -122,6 +130,7 @@ class IssueComment(github.GithubObject.CompletableGithubObject):
|
||||
self._body = github.GithubObject.NotSet
|
||||
self._created_at = github.GithubObject.NotSet
|
||||
self._id = github.GithubObject.NotSet
|
||||
self._issue_url = github.GithubObject.NotSet
|
||||
self._updated_at = github.GithubObject.NotSet
|
||||
self._url = github.GithubObject.NotSet
|
||||
self._html_url = github.GithubObject.NotSet
|
||||
@@ -137,6 +146,9 @@ class IssueComment(github.GithubObject.CompletableGithubObject):
|
||||
if "id" in attributes: # pragma no branch
|
||||
assert attributes["id"] is None or isinstance(attributes["id"], (int, long)), attributes["id"]
|
||||
self._id = attributes["id"]
|
||||
if "issue_url" in attributes: # pragma no branch
|
||||
assert attributes["issue_url"] is None or isinstance(attributes["issue_url"], (str, unicode)), attributes["issue_url"]
|
||||
self._issue_url = attributes["issue_url"]
|
||||
if "updated_at" in attributes: # pragma no branch
|
||||
assert attributes["updated_at"] is None or isinstance(attributes["updated_at"], (str, unicode)), attributes["updated_at"]
|
||||
self._updated_at = self._parseDatetime(attributes["updated_at"])
|
||||
|
||||
@@ -39,7 +39,6 @@ import Legacy
|
||||
import github.GithubObject
|
||||
import HookDescription
|
||||
import GitignoreTemplate
|
||||
import Notification
|
||||
import Status
|
||||
import StatusMessage
|
||||
import RateLimit
|
||||
|
||||
@@ -87,6 +87,14 @@ class Milestone(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._id)
|
||||
return self._NoneIfNotSet(self._id)
|
||||
|
||||
@property
|
||||
def labels_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._labels_url)
|
||||
return self._NoneIfNotSet(self._labels_url)
|
||||
|
||||
@property
|
||||
def number(self):
|
||||
"""
|
||||
@@ -119,6 +127,14 @@ class Milestone(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._title)
|
||||
return self._NoneIfNotSet(self._title)
|
||||
|
||||
@property
|
||||
def updated_at(self):
|
||||
"""
|
||||
:type: datetime.datetime
|
||||
"""
|
||||
self._completeIfNotSet(self._updated_at)
|
||||
return self._NoneIfNotSet(self._updated_at)
|
||||
|
||||
@property
|
||||
def url(self):
|
||||
"""
|
||||
@@ -189,10 +205,12 @@ class Milestone(github.GithubObject.CompletableGithubObject):
|
||||
self._description = github.GithubObject.NotSet
|
||||
self._due_on = github.GithubObject.NotSet
|
||||
self._id = github.GithubObject.NotSet
|
||||
self._labels_url = github.GithubObject.NotSet
|
||||
self._number = github.GithubObject.NotSet
|
||||
self._open_issues = github.GithubObject.NotSet
|
||||
self._state = github.GithubObject.NotSet
|
||||
self._title = github.GithubObject.NotSet
|
||||
self._updated_at = github.GithubObject.NotSet
|
||||
self._url = github.GithubObject.NotSet
|
||||
|
||||
def _useAttributes(self, attributes):
|
||||
@@ -214,6 +232,9 @@ class Milestone(github.GithubObject.CompletableGithubObject):
|
||||
if "id" in attributes: # pragma no branch
|
||||
assert attributes["id"] is None or isinstance(attributes["id"], (int, long)), attributes["id"]
|
||||
self._id = attributes["id"]
|
||||
if "labels_url" in attributes: # pragma no branch
|
||||
assert attributes["labels_url"] is None or isinstance(attributes["labels_url"], (str, unicode)), attributes["labels_url"]
|
||||
self._labels_url = attributes["labels_url"]
|
||||
if "number" in attributes: # pragma no branch
|
||||
assert attributes["number"] is None or isinstance(attributes["number"], (int, long)), attributes["number"]
|
||||
self._number = attributes["number"]
|
||||
@@ -226,6 +247,9 @@ class Milestone(github.GithubObject.CompletableGithubObject):
|
||||
if "title" in attributes: # pragma no branch
|
||||
assert attributes["title"] is None or isinstance(attributes["title"], (str, unicode)), attributes["title"]
|
||||
self._title = attributes["title"]
|
||||
if "updated_at" in attributes: # pragma no branch
|
||||
assert attributes["updated_at"] is None or isinstance(attributes["updated_at"], (str, unicode)), attributes["updated_at"]
|
||||
self._updated_at = self._parseDatetime(attributes["updated_at"])
|
||||
if "url" in attributes: # pragma no branch
|
||||
assert attributes["url"] is None or isinstance(attributes["url"], (str, unicode)), attributes["url"]
|
||||
self._url = attributes["url"]
|
||||
|
||||
@@ -113,6 +113,14 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._email)
|
||||
return self._NoneIfNotSet(self._email)
|
||||
|
||||
@property
|
||||
def events_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._events_url)
|
||||
return self._NoneIfNotSet(self._events_url)
|
||||
|
||||
@property
|
||||
def followers(self):
|
||||
"""
|
||||
@@ -121,6 +129,14 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._followers)
|
||||
return self._NoneIfNotSet(self._followers)
|
||||
|
||||
@property
|
||||
def followers_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._followers_url)
|
||||
return self._NoneIfNotSet(self._followers_url)
|
||||
|
||||
@property
|
||||
def following(self):
|
||||
"""
|
||||
@@ -129,6 +145,22 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._following)
|
||||
return self._NoneIfNotSet(self._following)
|
||||
|
||||
@property
|
||||
def following_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._following_url)
|
||||
return self._NoneIfNotSet(self._following_url)
|
||||
|
||||
@property
|
||||
def gists_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._gists_url)
|
||||
return self._NoneIfNotSet(self._gists_url)
|
||||
|
||||
@property
|
||||
def gravatar_id(self):
|
||||
"""
|
||||
@@ -185,6 +217,14 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._name)
|
||||
return self._NoneIfNotSet(self._name)
|
||||
|
||||
@property
|
||||
def organizations_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._organizations_url)
|
||||
return self._NoneIfNotSet(self._organizations_url)
|
||||
|
||||
@property
|
||||
def owned_private_repos(self):
|
||||
"""
|
||||
@@ -225,6 +265,38 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._public_repos)
|
||||
return self._NoneIfNotSet(self._public_repos)
|
||||
|
||||
@property
|
||||
def received_events_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._received_events_url)
|
||||
return self._NoneIfNotSet(self._received_events_url)
|
||||
|
||||
@property
|
||||
def repos_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._repos_url)
|
||||
return self._NoneIfNotSet(self._repos_url)
|
||||
|
||||
@property
|
||||
def starred_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._starred_url)
|
||||
return self._NoneIfNotSet(self._starred_url)
|
||||
|
||||
@property
|
||||
def subscriptions_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._subscriptions_url)
|
||||
return self._NoneIfNotSet(self._subscriptions_url)
|
||||
|
||||
@property
|
||||
def total_private_repos(self):
|
||||
"""
|
||||
@@ -241,6 +313,14 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._type)
|
||||
return self._NoneIfNotSet(self._type)
|
||||
|
||||
@property
|
||||
def updated_at(self):
|
||||
"""
|
||||
:type: datetime.datetime
|
||||
"""
|
||||
self._completeIfNotSet(self._updated_at)
|
||||
return self._NoneIfNotSet(self._updated_at)
|
||||
|
||||
@property
|
||||
def url(self):
|
||||
"""
|
||||
@@ -474,8 +554,12 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
self._created_at = github.GithubObject.NotSet
|
||||
self._disk_usage = github.GithubObject.NotSet
|
||||
self._email = github.GithubObject.NotSet
|
||||
self._events_url = github.GithubObject.NotSet
|
||||
self._followers = github.GithubObject.NotSet
|
||||
self._followers_url = github.GithubObject.NotSet
|
||||
self._following = github.GithubObject.NotSet
|
||||
self._following_url = github.GithubObject.NotSet
|
||||
self._gists_url = github.GithubObject.NotSet
|
||||
self._gravatar_id = github.GithubObject.NotSet
|
||||
self._hireable = github.GithubObject.NotSet
|
||||
self._html_url = github.GithubObject.NotSet
|
||||
@@ -483,13 +567,19 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
self._location = github.GithubObject.NotSet
|
||||
self._login = github.GithubObject.NotSet
|
||||
self._name = github.GithubObject.NotSet
|
||||
self._organizations_url = github.GithubObject.NotSet
|
||||
self._owned_private_repos = github.GithubObject.NotSet
|
||||
self._plan = github.GithubObject.NotSet
|
||||
self._private_gists = github.GithubObject.NotSet
|
||||
self._public_gists = github.GithubObject.NotSet
|
||||
self._public_repos = github.GithubObject.NotSet
|
||||
self._received_events_url = github.GithubObject.NotSet
|
||||
self._repos_url = github.GithubObject.NotSet
|
||||
self._starred_url = github.GithubObject.NotSet
|
||||
self._subscriptions_url = github.GithubObject.NotSet
|
||||
self._total_private_repos = github.GithubObject.NotSet
|
||||
self._type = github.GithubObject.NotSet
|
||||
self._updated_at = github.GithubObject.NotSet
|
||||
self._url = github.GithubObject.NotSet
|
||||
|
||||
def _useAttributes(self, attributes):
|
||||
@@ -520,12 +610,24 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
if "email" in attributes: # pragma no branch
|
||||
assert attributes["email"] is None or isinstance(attributes["email"], (str, unicode)), attributes["email"]
|
||||
self._email = attributes["email"]
|
||||
if "events_url" in attributes: # pragma no branch
|
||||
assert attributes["events_url"] is None or isinstance(attributes["events_url"], (str, unicode)), attributes["events_url"]
|
||||
self._events_url = attributes["events_url"]
|
||||
if "followers" in attributes: # pragma no branch
|
||||
assert attributes["followers"] is None or isinstance(attributes["followers"], (int, long)), attributes["followers"]
|
||||
self._followers = attributes["followers"]
|
||||
if "followers_url" in attributes: # pragma no branch
|
||||
assert attributes["followers_url"] is None or isinstance(attributes["followers_url"], (str, unicode)), attributes["followers_url"]
|
||||
self._followers_url = attributes["followers_url"]
|
||||
if "following" in attributes: # pragma no branch
|
||||
assert attributes["following"] is None or isinstance(attributes["following"], (int, long)), attributes["following"]
|
||||
self._following = attributes["following"]
|
||||
if "following_url" in attributes: # pragma no branch
|
||||
assert attributes["following_url"] is None or isinstance(attributes["following_url"], (str, unicode)), attributes["following_url"]
|
||||
self._following_url = attributes["following_url"]
|
||||
if "gists_url" in attributes: # pragma no branch
|
||||
assert attributes["gists_url"] is None or isinstance(attributes["gists_url"], (str, unicode)), attributes["gists_url"]
|
||||
self._gists_url = attributes["gists_url"]
|
||||
if "gravatar_id" in attributes: # pragma no branch
|
||||
assert attributes["gravatar_id"] is None or isinstance(attributes["gravatar_id"], (str, unicode)), attributes["gravatar_id"]
|
||||
self._gravatar_id = attributes["gravatar_id"]
|
||||
@@ -547,6 +649,9 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
if "name" in attributes: # pragma no branch
|
||||
assert attributes["name"] is None or isinstance(attributes["name"], (str, unicode)), attributes["name"]
|
||||
self._name = attributes["name"]
|
||||
if "organizations_url" in attributes: # pragma no branch
|
||||
assert attributes["organizations_url"] is None or isinstance(attributes["organizations_url"], (str, unicode)), attributes["organizations_url"]
|
||||
self._organizations_url = attributes["organizations_url"]
|
||||
if "owned_private_repos" in attributes: # pragma no branch
|
||||
assert attributes["owned_private_repos"] is None or isinstance(attributes["owned_private_repos"], (int, long)), attributes["owned_private_repos"]
|
||||
self._owned_private_repos = attributes["owned_private_repos"]
|
||||
@@ -562,12 +667,27 @@ class NamedUser(github.GithubObject.CompletableGithubObject):
|
||||
if "public_repos" in attributes: # pragma no branch
|
||||
assert attributes["public_repos"] is None or isinstance(attributes["public_repos"], (int, long)), attributes["public_repos"]
|
||||
self._public_repos = attributes["public_repos"]
|
||||
if "received_events_url" in attributes: # pragma no branch
|
||||
assert attributes["received_events_url"] is None or isinstance(attributes["received_events_url"], (str, unicode)), attributes["received_events_url"]
|
||||
self._received_events_url = attributes["received_events_url"]
|
||||
if "repos_url" in attributes: # pragma no branch
|
||||
assert attributes["repos_url"] is None or isinstance(attributes["repos_url"], (str, unicode)), attributes["repos_url"]
|
||||
self._repos_url = attributes["repos_url"]
|
||||
if "starred_url" in attributes: # pragma no branch
|
||||
assert attributes["starred_url"] is None or isinstance(attributes["starred_url"], (str, unicode)), attributes["starred_url"]
|
||||
self._starred_url = attributes["starred_url"]
|
||||
if "subscriptions_url" in attributes: # pragma no branch
|
||||
assert attributes["subscriptions_url"] is None or isinstance(attributes["subscriptions_url"], (str, unicode)), attributes["subscriptions_url"]
|
||||
self._subscriptions_url = attributes["subscriptions_url"]
|
||||
if "total_private_repos" in attributes: # pragma no branch
|
||||
assert attributes["total_private_repos"] is None or isinstance(attributes["total_private_repos"], (int, long)), attributes["total_private_repos"]
|
||||
self._total_private_repos = attributes["total_private_repos"]
|
||||
if "type" in attributes: # pragma no branch
|
||||
assert attributes["type"] is None or isinstance(attributes["type"], (str, unicode)), attributes["type"]
|
||||
self._type = attributes["type"]
|
||||
if "updated_at" in attributes: # pragma no branch
|
||||
assert attributes["updated_at"] is None or isinstance(attributes["updated_at"], (str, unicode)), attributes["updated_at"]
|
||||
self._updated_at = self._parseDatetime(attributes["updated_at"])
|
||||
if "url" in attributes: # pragma no branch
|
||||
assert attributes["url"] is None or isinstance(attributes["url"], (str, unicode)), attributes["url"]
|
||||
self._url = attributes["url"]
|
||||
|
||||
@@ -43,6 +43,14 @@ class Notification(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._id)
|
||||
return self._NoneIfNotSet(self._id)
|
||||
|
||||
@property
|
||||
def last_read_at(self):
|
||||
"""
|
||||
:type: datetime.datetime
|
||||
"""
|
||||
self._completeIfNotSet(self._last_read_at)
|
||||
return self._NoneIfNotSet(self._last_read_at)
|
||||
|
||||
@property
|
||||
def repository(self):
|
||||
"""
|
||||
@@ -67,6 +75,14 @@ class Notification(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._reason)
|
||||
return self._NoneIfNotSet(self._reason)
|
||||
|
||||
@property
|
||||
def subscription_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._subscription_url)
|
||||
return self._NoneIfNotSet(self._subscription_url)
|
||||
|
||||
@property
|
||||
def unread(self):
|
||||
"""
|
||||
@@ -93,8 +109,10 @@ class Notification(github.GithubObject.CompletableGithubObject):
|
||||
|
||||
def _initAttributes(self):
|
||||
self._id = github.GithubObject.NotSet
|
||||
self._last_read_at = github.GithubObject.NotSet
|
||||
self._repository = github.GithubObject.NotSet
|
||||
self._reason = github.GithubObject.NotSet
|
||||
self._subscription_url = github.GithubObject.NotSet
|
||||
self._unread = github.GithubObject.NotSet
|
||||
self._updated_at = github.GithubObject.NotSet
|
||||
self._url = github.GithubObject.NotSet
|
||||
@@ -103,6 +121,9 @@ class Notification(github.GithubObject.CompletableGithubObject):
|
||||
if "id" in attributes: # pragma no branch
|
||||
assert attributes["id"] is None or isinstance(attributes["id"], (str, unicode)), attributes["id"]
|
||||
self._id = attributes["id"]
|
||||
if "last_read_at" in attributes: # pragma no branch
|
||||
assert attributes["last_read_at"] is None or isinstance(attributes["last_read_at"], (str, unicode)), attributes["last_read_at"]
|
||||
self._last_read_at = self._parseDatetime(attributes["last_read_at"])
|
||||
if "repository" in attributes: # pragma no branch
|
||||
assert attributes["repository"] is None or isinstance(attributes["repository"], dict), attributes["repository"]
|
||||
self._repository = None if attributes["repository"] is None else github.Repository.Repository(self._requester, self._headers, attributes["repository"], completed=False)
|
||||
@@ -112,6 +133,9 @@ class Notification(github.GithubObject.CompletableGithubObject):
|
||||
if "reason" in attributes: # pragma no branch
|
||||
assert attributes["reason"] is None or isinstance(attributes["reason"], (str, unicode)), attributes["reason"]
|
||||
self._reason = attributes["reason"]
|
||||
if "subscription_url" in attributes: # pragma no branch
|
||||
assert attributes["subscription_url"] is None or isinstance(attributes["subscription_url"], (str, unicode)), attributes["subscription_url"]
|
||||
self._subscription_url = attributes["subscription_url"]
|
||||
if "unread" in attributes: # pragma no branch
|
||||
assert attributes["unread"] is None or isinstance(attributes["unread"], bool), attributes["unread"]
|
||||
self._unread = attributes["unread"]
|
||||
|
||||
@@ -107,6 +107,14 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._email)
|
||||
return self._NoneIfNotSet(self._email)
|
||||
|
||||
@property
|
||||
def events_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._events_url)
|
||||
return self._NoneIfNotSet(self._events_url)
|
||||
|
||||
@property
|
||||
def followers(self):
|
||||
"""
|
||||
@@ -163,6 +171,14 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._login)
|
||||
return self._NoneIfNotSet(self._login)
|
||||
|
||||
@property
|
||||
def members_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._members_url)
|
||||
return self._NoneIfNotSet(self._members_url)
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""
|
||||
@@ -203,6 +219,14 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._public_gists)
|
||||
return self._NoneIfNotSet(self._public_gists)
|
||||
|
||||
@property
|
||||
def public_members_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._public_members_url)
|
||||
return self._NoneIfNotSet(self._public_members_url)
|
||||
|
||||
@property
|
||||
def public_repos(self):
|
||||
"""
|
||||
@@ -211,6 +235,14 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._public_repos)
|
||||
return self._NoneIfNotSet(self._public_repos)
|
||||
|
||||
@property
|
||||
def repos_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._repos_url)
|
||||
return self._NoneIfNotSet(self._repos_url)
|
||||
|
||||
@property
|
||||
def total_private_repos(self):
|
||||
"""
|
||||
@@ -227,6 +259,14 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._type)
|
||||
return self._NoneIfNotSet(self._type)
|
||||
|
||||
@property
|
||||
def updated_at(self):
|
||||
"""
|
||||
:type: datetime.datetime
|
||||
"""
|
||||
self._completeIfNotSet(self._updated_at)
|
||||
return self._NoneIfNotSet(self._updated_at)
|
||||
|
||||
@property
|
||||
def url(self):
|
||||
"""
|
||||
@@ -567,6 +607,7 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
self._created_at = github.GithubObject.NotSet
|
||||
self._disk_usage = github.GithubObject.NotSet
|
||||
self._email = github.GithubObject.NotSet
|
||||
self._events_url = github.GithubObject.NotSet
|
||||
self._followers = github.GithubObject.NotSet
|
||||
self._following = github.GithubObject.NotSet
|
||||
self._gravatar_id = github.GithubObject.NotSet
|
||||
@@ -574,14 +615,18 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
self._id = github.GithubObject.NotSet
|
||||
self._location = github.GithubObject.NotSet
|
||||
self._login = github.GithubObject.NotSet
|
||||
self._members_url = github.GithubObject.NotSet
|
||||
self._name = github.GithubObject.NotSet
|
||||
self._owned_private_repos = github.GithubObject.NotSet
|
||||
self._plan = github.GithubObject.NotSet
|
||||
self._private_gists = github.GithubObject.NotSet
|
||||
self._public_gists = github.GithubObject.NotSet
|
||||
self._public_members_url = github.GithubObject.NotSet
|
||||
self._public_repos = github.GithubObject.NotSet
|
||||
self._repos_url = github.GithubObject.NotSet
|
||||
self._total_private_repos = github.GithubObject.NotSet
|
||||
self._type = github.GithubObject.NotSet
|
||||
self._updated_at = github.GithubObject.NotSet
|
||||
self._url = github.GithubObject.NotSet
|
||||
|
||||
def _useAttributes(self, attributes):
|
||||
@@ -609,6 +654,9 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
if "email" in attributes: # pragma no branch
|
||||
assert attributes["email"] is None or isinstance(attributes["email"], (str, unicode)), attributes["email"]
|
||||
self._email = attributes["email"]
|
||||
if "events_url" in attributes: # pragma no branch
|
||||
assert attributes["events_url"] is None or isinstance(attributes["events_url"], (str, unicode)), attributes["events_url"]
|
||||
self._events_url = attributes["events_url"]
|
||||
if "followers" in attributes: # pragma no branch
|
||||
assert attributes["followers"] is None or isinstance(attributes["followers"], (int, long)), attributes["followers"]
|
||||
self._followers = attributes["followers"]
|
||||
@@ -630,6 +678,9 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
if "login" in attributes: # pragma no branch
|
||||
assert attributes["login"] is None or isinstance(attributes["login"], (str, unicode)), attributes["login"]
|
||||
self._login = attributes["login"]
|
||||
if "members_url" in attributes: # pragma no branch
|
||||
assert attributes["members_url"] is None or isinstance(attributes["members_url"], (str, unicode)), attributes["members_url"]
|
||||
self._members_url = attributes["members_url"]
|
||||
if "name" in attributes: # pragma no branch
|
||||
assert attributes["name"] is None or isinstance(attributes["name"], (str, unicode)), attributes["name"]
|
||||
self._name = attributes["name"]
|
||||
@@ -645,15 +696,24 @@ class Organization(github.GithubObject.CompletableGithubObject):
|
||||
if "public_gists" in attributes: # pragma no branch
|
||||
assert attributes["public_gists"] is None or isinstance(attributes["public_gists"], (int, long)), attributes["public_gists"]
|
||||
self._public_gists = attributes["public_gists"]
|
||||
if "public_members_url" in attributes: # pragma no branch
|
||||
assert attributes["public_members_url"] is None or isinstance(attributes["public_members_url"], (str, unicode)), attributes["public_members_url"]
|
||||
self._public_members_url = attributes["public_members_url"]
|
||||
if "public_repos" in attributes: # pragma no branch
|
||||
assert attributes["public_repos"] is None or isinstance(attributes["public_repos"], (int, long)), attributes["public_repos"]
|
||||
self._public_repos = attributes["public_repos"]
|
||||
if "repos_url" in attributes: # pragma no branch
|
||||
assert attributes["repos_url"] is None or isinstance(attributes["repos_url"], (str, unicode)), attributes["repos_url"]
|
||||
self._repos_url = attributes["repos_url"]
|
||||
if "total_private_repos" in attributes: # pragma no branch
|
||||
assert attributes["total_private_repos"] is None or isinstance(attributes["total_private_repos"], (int, long)), attributes["total_private_repos"]
|
||||
self._total_private_repos = attributes["total_private_repos"]
|
||||
if "type" in attributes: # pragma no branch
|
||||
assert attributes["type"] is None or isinstance(attributes["type"], (str, unicode)), attributes["type"]
|
||||
self._type = attributes["type"]
|
||||
if "updated_at" in attributes: # pragma no branch
|
||||
assert attributes["updated_at"] is None or isinstance(attributes["updated_at"], (str, unicode)), attributes["updated_at"]
|
||||
self._updated_at = self._parseDatetime(attributes["updated_at"])
|
||||
if "url" in attributes: # pragma no branch
|
||||
assert attributes["url"] is None or isinstance(attributes["url"], (str, unicode)), attributes["url"]
|
||||
self._url = attributes["url"]
|
||||
|
||||
@@ -99,6 +99,14 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._comments)
|
||||
return self._NoneIfNotSet(self._comments)
|
||||
|
||||
@property
|
||||
def comments_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._comments_url)
|
||||
return self._NoneIfNotSet(self._comments_url)
|
||||
|
||||
@property
|
||||
def commits(self):
|
||||
"""
|
||||
@@ -107,6 +115,14 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._commits)
|
||||
return self._NoneIfNotSet(self._commits)
|
||||
|
||||
@property
|
||||
def commits_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._commits_url)
|
||||
return self._NoneIfNotSet(self._commits_url)
|
||||
|
||||
@property
|
||||
def created_at(self):
|
||||
"""
|
||||
@@ -163,6 +179,14 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._issue_url)
|
||||
return self._NoneIfNotSet(self._issue_url)
|
||||
|
||||
@property
|
||||
def merge_commit_sha(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._merge_commit_sha)
|
||||
return self._NoneIfNotSet(self._merge_commit_sha)
|
||||
|
||||
@property
|
||||
def mergeable(self):
|
||||
"""
|
||||
@@ -171,6 +195,14 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._mergeable)
|
||||
return self._NoneIfNotSet(self._mergeable)
|
||||
|
||||
@property
|
||||
def mergeable_state(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._mergeable_state)
|
||||
return self._NoneIfNotSet(self._mergeable_state)
|
||||
|
||||
@property
|
||||
def merged(self):
|
||||
"""
|
||||
@@ -195,6 +227,14 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._merged_by)
|
||||
return self._NoneIfNotSet(self._merged_by)
|
||||
|
||||
@property
|
||||
def milestone(self):
|
||||
"""
|
||||
:type: :class:`github.Milestone.Milestone`
|
||||
"""
|
||||
self._completeIfNotSet(self._milestone)
|
||||
return self._NoneIfNotSet(self._milestone)
|
||||
|
||||
@property
|
||||
def number(self):
|
||||
"""
|
||||
@@ -211,6 +251,14 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._patch_url)
|
||||
return self._NoneIfNotSet(self._patch_url)
|
||||
|
||||
@property
|
||||
def review_comment_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._review_comment_url)
|
||||
return self._NoneIfNotSet(self._review_comment_url)
|
||||
|
||||
@property
|
||||
def review_comments(self):
|
||||
"""
|
||||
@@ -219,6 +267,14 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._review_comments)
|
||||
return self._NoneIfNotSet(self._review_comments)
|
||||
|
||||
@property
|
||||
def review_comments_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._review_comments_url)
|
||||
return self._NoneIfNotSet(self._review_comments_url)
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
"""
|
||||
@@ -463,7 +519,9 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
self._changed_files = github.GithubObject.NotSet
|
||||
self._closed_at = github.GithubObject.NotSet
|
||||
self._comments = github.GithubObject.NotSet
|
||||
self._comments_url = github.GithubObject.NotSet
|
||||
self._commits = github.GithubObject.NotSet
|
||||
self._commits_url = github.GithubObject.NotSet
|
||||
self._created_at = github.GithubObject.NotSet
|
||||
self._deletions = github.GithubObject.NotSet
|
||||
self._diff_url = github.GithubObject.NotSet
|
||||
@@ -471,13 +529,18 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
self._html_url = github.GithubObject.NotSet
|
||||
self._id = github.GithubObject.NotSet
|
||||
self._issue_url = github.GithubObject.NotSet
|
||||
self._merge_commit_sha = github.GithubObject.NotSet
|
||||
self._mergeable = github.GithubObject.NotSet
|
||||
self._mergeable_state = github.GithubObject.NotSet
|
||||
self._merged = github.GithubObject.NotSet
|
||||
self._merged_at = github.GithubObject.NotSet
|
||||
self._merged_by = github.GithubObject.NotSet
|
||||
self._milestone = github.GithubObject.NotSet
|
||||
self._number = github.GithubObject.NotSet
|
||||
self._patch_url = github.GithubObject.NotSet
|
||||
self._review_comment_url = github.GithubObject.NotSet
|
||||
self._review_comments = github.GithubObject.NotSet
|
||||
self._review_comments_url = github.GithubObject.NotSet
|
||||
self._state = github.GithubObject.NotSet
|
||||
self._title = github.GithubObject.NotSet
|
||||
self._updated_at = github.GithubObject.NotSet
|
||||
@@ -506,9 +569,15 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
if "comments" in attributes: # pragma no branch
|
||||
assert attributes["comments"] is None or isinstance(attributes["comments"], (int, long)), attributes["comments"]
|
||||
self._comments = attributes["comments"]
|
||||
if "comments_url" in attributes: # pragma no branch
|
||||
assert attributes["comments_url"] is None or isinstance(attributes["comments_url"], (str, unicode)), attributes["comments_url"]
|
||||
self._comments_url = attributes["comments_url"]
|
||||
if "commits" in attributes: # pragma no branch
|
||||
assert attributes["commits"] is None or isinstance(attributes["commits"], (int, long)), attributes["commits"]
|
||||
self._commits = attributes["commits"]
|
||||
if "commits_url" in attributes: # pragma no branch
|
||||
assert attributes["commits_url"] is None or isinstance(attributes["commits_url"], (str, unicode)), attributes["commits_url"]
|
||||
self._commits_url = attributes["commits_url"]
|
||||
if "created_at" in attributes: # pragma no branch
|
||||
assert attributes["created_at"] is None or isinstance(attributes["created_at"], (str, unicode)), attributes["created_at"]
|
||||
self._created_at = self._parseDatetime(attributes["created_at"])
|
||||
@@ -530,9 +599,15 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
if "issue_url" in attributes: # pragma no branch
|
||||
assert attributes["issue_url"] is None or isinstance(attributes["issue_url"], (str, unicode)), attributes["issue_url"]
|
||||
self._issue_url = attributes["issue_url"]
|
||||
if "merge_commit_sha" in attributes: # pragma no branch
|
||||
assert attributes["merge_commit_sha"] is None or isinstance(attributes["merge_commit_sha"], (str, unicode)), attributes["merge_commit_sha"]
|
||||
self._merge_commit_sha = attributes["merge_commit_sha"]
|
||||
if "mergeable" in attributes: # pragma no branch
|
||||
assert attributes["mergeable"] is None or isinstance(attributes["mergeable"], bool), attributes["mergeable"]
|
||||
self._mergeable = attributes["mergeable"]
|
||||
if "mergeable_state" in attributes: # pragma no branch
|
||||
assert attributes["mergeable_state"] is None or isinstance(attributes["mergeable_state"], (str, unicode)), attributes["mergeable_state"]
|
||||
self._mergeable_state = attributes["mergeable_state"]
|
||||
if "merged" in attributes: # pragma no branch
|
||||
assert attributes["merged"] is None or isinstance(attributes["merged"], bool), attributes["merged"]
|
||||
self._merged = attributes["merged"]
|
||||
@@ -542,15 +617,24 @@ class PullRequest(github.GithubObject.CompletableGithubObject):
|
||||
if "merged_by" in attributes: # pragma no branch
|
||||
assert attributes["merged_by"] is None or isinstance(attributes["merged_by"], dict), attributes["merged_by"]
|
||||
self._merged_by = None if attributes["merged_by"] is None else github.NamedUser.NamedUser(self._requester, self._headers, attributes["merged_by"], completed=False)
|
||||
if "milestone" in attributes: # pragma no branch
|
||||
assert attributes["milestone"] is None or isinstance(attributes["milestone"], dict), attributes["milestone"]
|
||||
self._milestone = None if attributes["milestone"] is None else github.Milestone.Milestone(self._requester, self._headers, attributes["milestone"], completed=False)
|
||||
if "number" in attributes: # pragma no branch
|
||||
assert attributes["number"] is None or isinstance(attributes["number"], (int, long)), attributes["number"]
|
||||
self._number = attributes["number"]
|
||||
if "patch_url" in attributes: # pragma no branch
|
||||
assert attributes["patch_url"] is None or isinstance(attributes["patch_url"], (str, unicode)), attributes["patch_url"]
|
||||
self._patch_url = attributes["patch_url"]
|
||||
if "review_comment_url" in attributes: # pragma no branch
|
||||
assert attributes["review_comment_url"] is None or isinstance(attributes["review_comment_url"], (str, unicode)), attributes["review_comment_url"]
|
||||
self._review_comment_url = attributes["review_comment_url"]
|
||||
if "review_comments" in attributes: # pragma no branch
|
||||
assert attributes["review_comments"] is None or isinstance(attributes["review_comments"], (int, long)), attributes["review_comments"]
|
||||
self._review_comments = attributes["review_comments"]
|
||||
if "review_comments_url" in attributes: # pragma no branch
|
||||
assert attributes["review_comments_url"] is None or isinstance(attributes["review_comments_url"], (str, unicode)), attributes["review_comments_url"]
|
||||
self._review_comments_url = attributes["review_comments_url"]
|
||||
if "state" in attributes: # pragma no branch
|
||||
assert attributes["state"] is None or isinstance(attributes["state"], (str, unicode)), attributes["state"]
|
||||
self._state = attributes["state"]
|
||||
|
||||
@@ -60,6 +60,14 @@ class PullRequestComment(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._created_at)
|
||||
return self._NoneIfNotSet(self._created_at)
|
||||
|
||||
@property
|
||||
def diff_hunk(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._diff_hunk)
|
||||
return self._NoneIfNotSet(self._diff_hunk)
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
"""
|
||||
@@ -100,6 +108,14 @@ class PullRequestComment(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._position)
|
||||
return self._NoneIfNotSet(self._position)
|
||||
|
||||
@property
|
||||
def pull_request_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._pull_request_url)
|
||||
return self._NoneIfNotSet(self._pull_request_url)
|
||||
|
||||
@property
|
||||
def updated_at(self):
|
||||
"""
|
||||
@@ -163,11 +179,13 @@ class PullRequestComment(github.GithubObject.CompletableGithubObject):
|
||||
self._body = github.GithubObject.NotSet
|
||||
self._commit_id = github.GithubObject.NotSet
|
||||
self._created_at = github.GithubObject.NotSet
|
||||
self._diff_hunk = github.GithubObject.NotSet
|
||||
self._id = github.GithubObject.NotSet
|
||||
self._original_commit_id = github.GithubObject.NotSet
|
||||
self._original_position = github.GithubObject.NotSet
|
||||
self._path = github.GithubObject.NotSet
|
||||
self._position = github.GithubObject.NotSet
|
||||
self._pull_request_url = github.GithubObject.NotSet
|
||||
self._updated_at = github.GithubObject.NotSet
|
||||
self._url = github.GithubObject.NotSet
|
||||
self._html_url = github.GithubObject.NotSet
|
||||
@@ -183,6 +201,9 @@ class PullRequestComment(github.GithubObject.CompletableGithubObject):
|
||||
if "created_at" in attributes: # pragma no branch
|
||||
assert attributes["created_at"] is None or isinstance(attributes["created_at"], (str, unicode)), attributes["created_at"]
|
||||
self._created_at = self._parseDatetime(attributes["created_at"])
|
||||
if "diff_hunk" in attributes: # pragma no branch
|
||||
assert attributes["diff_hunk"] is None or isinstance(attributes["diff_hunk"], (str, unicode)), attributes["diff_hunk"]
|
||||
self._diff_hunk = attributes["diff_hunk"]
|
||||
if "id" in attributes: # pragma no branch
|
||||
assert attributes["id"] is None or isinstance(attributes["id"], (int, long)), attributes["id"]
|
||||
self._id = attributes["id"]
|
||||
@@ -198,6 +219,9 @@ class PullRequestComment(github.GithubObject.CompletableGithubObject):
|
||||
if "position" in attributes: # pragma no branch
|
||||
assert attributes["position"] is None or isinstance(attributes["position"], (int, long)), attributes["position"]
|
||||
self._position = attributes["position"]
|
||||
if "pull_request_url" in attributes: # pragma no branch
|
||||
assert attributes["pull_request_url"] is None or isinstance(attributes["pull_request_url"], (str, unicode)), attributes["pull_request_url"]
|
||||
self._pull_request_url = attributes["pull_request_url"]
|
||||
if "updated_at" in attributes: # pragma no branch
|
||||
assert attributes["updated_at"] is None or isinstance(attributes["updated_at"], (str, unicode)), attributes["updated_at"]
|
||||
self._updated_at = self._parseDatetime(attributes["updated_at"])
|
||||
|
||||
@@ -68,6 +68,38 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
This class represents Repositorys. The reference can be found here http://developer.github.com/v3/repos/
|
||||
"""
|
||||
|
||||
@property
|
||||
def archive_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._archive_url)
|
||||
return self._NoneIfNotSet(self._archive_url)
|
||||
|
||||
@property
|
||||
def assignees_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._assignees_url)
|
||||
return self._NoneIfNotSet(self._assignees_url)
|
||||
|
||||
@property
|
||||
def blobs_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._blobs_url)
|
||||
return self._NoneIfNotSet(self._blobs_url)
|
||||
|
||||
@property
|
||||
def branches_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._branches_url)
|
||||
return self._NoneIfNotSet(self._branches_url)
|
||||
|
||||
@property
|
||||
def clone_url(self):
|
||||
"""
|
||||
@@ -76,6 +108,54 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._clone_url)
|
||||
return self._NoneIfNotSet(self._clone_url)
|
||||
|
||||
@property
|
||||
def collaborators_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._collaborators_url)
|
||||
return self._NoneIfNotSet(self._collaborators_url)
|
||||
|
||||
@property
|
||||
def comments_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._comments_url)
|
||||
return self._NoneIfNotSet(self._comments_url)
|
||||
|
||||
@property
|
||||
def commits_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._commits_url)
|
||||
return self._NoneIfNotSet(self._commits_url)
|
||||
|
||||
@property
|
||||
def compare_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._compare_url)
|
||||
return self._NoneIfNotSet(self._compare_url)
|
||||
|
||||
@property
|
||||
def contents_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._contents_url)
|
||||
return self._NoneIfNotSet(self._contents_url)
|
||||
|
||||
@property
|
||||
def contributors_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._contributors_url)
|
||||
return self._NoneIfNotSet(self._contributors_url)
|
||||
|
||||
@property
|
||||
def created_at(self):
|
||||
"""
|
||||
@@ -84,6 +164,14 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._created_at)
|
||||
return self._NoneIfNotSet(self._created_at)
|
||||
|
||||
@property
|
||||
def default_branch(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._default_branch)
|
||||
return self._NoneIfNotSet(self._default_branch)
|
||||
|
||||
@property
|
||||
def description(self):
|
||||
"""
|
||||
@@ -92,6 +180,22 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._description)
|
||||
return self._NoneIfNotSet(self._description)
|
||||
|
||||
@property
|
||||
def downloads_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._downloads_url)
|
||||
return self._NoneIfNotSet(self._downloads_url)
|
||||
|
||||
@property
|
||||
def events_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._events_url)
|
||||
return self._NoneIfNotSet(self._events_url)
|
||||
|
||||
@property
|
||||
def fork(self):
|
||||
"""
|
||||
@@ -108,6 +212,22 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._forks)
|
||||
return self._NoneIfNotSet(self._forks)
|
||||
|
||||
@property
|
||||
def forks_count(self):
|
||||
"""
|
||||
:type: integer
|
||||
"""
|
||||
self._completeIfNotSet(self._forks_count)
|
||||
return self._NoneIfNotSet(self._forks_count)
|
||||
|
||||
@property
|
||||
def forks_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._forks_url)
|
||||
return self._NoneIfNotSet(self._forks_url)
|
||||
|
||||
@property
|
||||
def full_name(self):
|
||||
"""
|
||||
@@ -116,6 +236,30 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._full_name)
|
||||
return self._NoneIfNotSet(self._full_name)
|
||||
|
||||
@property
|
||||
def git_commits_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._git_commits_url)
|
||||
return self._NoneIfNotSet(self._git_commits_url)
|
||||
|
||||
@property
|
||||
def git_refs_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._git_refs_url)
|
||||
return self._NoneIfNotSet(self._git_refs_url)
|
||||
|
||||
@property
|
||||
def git_tags_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._git_tags_url)
|
||||
return self._NoneIfNotSet(self._git_tags_url)
|
||||
|
||||
@property
|
||||
def git_url(self):
|
||||
"""
|
||||
@@ -156,6 +300,14 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._homepage)
|
||||
return self._NoneIfNotSet(self._homepage)
|
||||
|
||||
@property
|
||||
def hooks_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._hooks_url)
|
||||
return self._NoneIfNotSet(self._hooks_url)
|
||||
|
||||
@property
|
||||
def html_url(self):
|
||||
"""
|
||||
@@ -172,6 +324,46 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._id)
|
||||
return self._NoneIfNotSet(self._id)
|
||||
|
||||
@property
|
||||
def issue_comment_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._issue_comment_url)
|
||||
return self._NoneIfNotSet(self._issue_comment_url)
|
||||
|
||||
@property
|
||||
def issue_events_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._issue_events_url)
|
||||
return self._NoneIfNotSet(self._issue_events_url)
|
||||
|
||||
@property
|
||||
def issues_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._issues_url)
|
||||
return self._NoneIfNotSet(self._issues_url)
|
||||
|
||||
@property
|
||||
def keys_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._keys_url)
|
||||
return self._NoneIfNotSet(self._keys_url)
|
||||
|
||||
@property
|
||||
def labels_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._labels_url)
|
||||
return self._NoneIfNotSet(self._labels_url)
|
||||
|
||||
@property
|
||||
def language(self):
|
||||
"""
|
||||
@@ -180,6 +372,14 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._language)
|
||||
return self._NoneIfNotSet(self._language)
|
||||
|
||||
@property
|
||||
def languages_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._languages_url)
|
||||
return self._NoneIfNotSet(self._languages_url)
|
||||
|
||||
@property
|
||||
def master_branch(self):
|
||||
"""
|
||||
@@ -188,6 +388,30 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._master_branch)
|
||||
return self._NoneIfNotSet(self._master_branch)
|
||||
|
||||
@property
|
||||
def merges_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._merges_url)
|
||||
return self._NoneIfNotSet(self._merges_url)
|
||||
|
||||
@property
|
||||
def milestones_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._milestones_url)
|
||||
return self._NoneIfNotSet(self._milestones_url)
|
||||
|
||||
@property
|
||||
def mirror_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._mirror_url)
|
||||
return self._NoneIfNotSet(self._mirror_url)
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""
|
||||
@@ -196,6 +420,22 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._name)
|
||||
return self._NoneIfNotSet(self._name)
|
||||
|
||||
@property
|
||||
def network_count(self):
|
||||
"""
|
||||
:type: integer
|
||||
"""
|
||||
self._completeIfNotSet(self._network_count)
|
||||
return self._NoneIfNotSet(self._network_count)
|
||||
|
||||
@property
|
||||
def notifications_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._notifications_url)
|
||||
return self._NoneIfNotSet(self._notifications_url)
|
||||
|
||||
@property
|
||||
def open_issues(self):
|
||||
"""
|
||||
@@ -204,6 +444,14 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._open_issues)
|
||||
return self._NoneIfNotSet(self._open_issues)
|
||||
|
||||
@property
|
||||
def open_issues_count(self):
|
||||
"""
|
||||
:type: integer
|
||||
"""
|
||||
self._completeIfNotSet(self._open_issues_count)
|
||||
return self._NoneIfNotSet(self._open_issues_count)
|
||||
|
||||
@property
|
||||
def organization(self):
|
||||
"""
|
||||
@@ -244,6 +492,14 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._private)
|
||||
return self._NoneIfNotSet(self._private)
|
||||
|
||||
@property
|
||||
def pulls_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._pulls_url)
|
||||
return self._NoneIfNotSet(self._pulls_url)
|
||||
|
||||
@property
|
||||
def pushed_at(self):
|
||||
"""
|
||||
@@ -276,6 +532,38 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._ssh_url)
|
||||
return self._NoneIfNotSet(self._ssh_url)
|
||||
|
||||
@property
|
||||
def stargazers_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._stargazers_url)
|
||||
return self._NoneIfNotSet(self._stargazers_url)
|
||||
|
||||
@property
|
||||
def statuses_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._statuses_url)
|
||||
return self._NoneIfNotSet(self._statuses_url)
|
||||
|
||||
@property
|
||||
def subscribers_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._subscribers_url)
|
||||
return self._NoneIfNotSet(self._subscribers_url)
|
||||
|
||||
@property
|
||||
def subscription_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._subscription_url)
|
||||
return self._NoneIfNotSet(self._subscription_url)
|
||||
|
||||
@property
|
||||
def svn_url(self):
|
||||
"""
|
||||
@@ -284,6 +572,30 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._svn_url)
|
||||
return self._NoneIfNotSet(self._svn_url)
|
||||
|
||||
@property
|
||||
def tags_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._tags_url)
|
||||
return self._NoneIfNotSet(self._tags_url)
|
||||
|
||||
@property
|
||||
def teams_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._teams_url)
|
||||
return self._NoneIfNotSet(self._teams_url)
|
||||
|
||||
@property
|
||||
def trees_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._trees_url)
|
||||
return self._NoneIfNotSet(self._trees_url)
|
||||
|
||||
@property
|
||||
def updated_at(self):
|
||||
"""
|
||||
@@ -308,6 +620,14 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._watchers)
|
||||
return self._NoneIfNotSet(self._watchers)
|
||||
|
||||
@property
|
||||
def watchers_count(self):
|
||||
"""
|
||||
:type: integer
|
||||
"""
|
||||
self._completeIfNotSet(self._watchers_count)
|
||||
return self._NoneIfNotSet(self._watchers_count)
|
||||
|
||||
def add_to_collaborators(self, collaborator):
|
||||
"""
|
||||
:calls: `PUT /repos/:owner/:repo/collaborators/:user <http://developer.github.com/v3/repos/collaborators>`_
|
||||
@@ -1567,56 +1887,150 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
return self.owner.login + "/" + self.name
|
||||
|
||||
def _initAttributes(self):
|
||||
self._archive_url = github.GithubObject.NotSet
|
||||
self._assignees_url = github.GithubObject.NotSet
|
||||
self._blobs_url = github.GithubObject.NotSet
|
||||
self._branches_url = github.GithubObject.NotSet
|
||||
self._clone_url = github.GithubObject.NotSet
|
||||
self._collaborators_url = github.GithubObject.NotSet
|
||||
self._comments_url = github.GithubObject.NotSet
|
||||
self._commits_url = github.GithubObject.NotSet
|
||||
self._compare_url = github.GithubObject.NotSet
|
||||
self._contents_url = github.GithubObject.NotSet
|
||||
self._contributors_url = github.GithubObject.NotSet
|
||||
self._created_at = github.GithubObject.NotSet
|
||||
self._default_branch = github.GithubObject.NotSet
|
||||
self._description = github.GithubObject.NotSet
|
||||
self._downloads_url = github.GithubObject.NotSet
|
||||
self._events_url = github.GithubObject.NotSet
|
||||
self._fork = github.GithubObject.NotSet
|
||||
self._forks = github.GithubObject.NotSet
|
||||
self._forks_count = github.GithubObject.NotSet
|
||||
self._forks_url = github.GithubObject.NotSet
|
||||
self._full_name = github.GithubObject.NotSet
|
||||
self._git_commits_url = github.GithubObject.NotSet
|
||||
self._git_refs_url = github.GithubObject.NotSet
|
||||
self._git_tags_url = github.GithubObject.NotSet
|
||||
self._git_url = github.GithubObject.NotSet
|
||||
self._has_downloads = github.GithubObject.NotSet
|
||||
self._has_issues = github.GithubObject.NotSet
|
||||
self._has_wiki = github.GithubObject.NotSet
|
||||
self._homepage = github.GithubObject.NotSet
|
||||
self._hooks_url = github.GithubObject.NotSet
|
||||
self._html_url = github.GithubObject.NotSet
|
||||
self._id = github.GithubObject.NotSet
|
||||
self._issue_comment_url = github.GithubObject.NotSet
|
||||
self._issue_events_url = github.GithubObject.NotSet
|
||||
self._issues_url = github.GithubObject.NotSet
|
||||
self._keys_url = github.GithubObject.NotSet
|
||||
self._labels_url = github.GithubObject.NotSet
|
||||
self._language = github.GithubObject.NotSet
|
||||
self._languages_url = github.GithubObject.NotSet
|
||||
self._master_branch = github.GithubObject.NotSet
|
||||
self._merges_url = github.GithubObject.NotSet
|
||||
self._milestones_url = github.GithubObject.NotSet
|
||||
self._mirror_url = github.GithubObject.NotSet
|
||||
self._name = github.GithubObject.NotSet
|
||||
self._network_count = github.GithubObject.NotSet
|
||||
self._notifications_url = github.GithubObject.NotSet
|
||||
self._open_issues = github.GithubObject.NotSet
|
||||
self._open_issues_count = github.GithubObject.NotSet
|
||||
self._organization = github.GithubObject.NotSet
|
||||
self._owner = github.GithubObject.NotSet
|
||||
self._parent = github.GithubObject.NotSet
|
||||
self._permissions = github.GithubObject.NotSet
|
||||
self._private = github.GithubObject.NotSet
|
||||
self._pulls_url = github.GithubObject.NotSet
|
||||
self._pushed_at = github.GithubObject.NotSet
|
||||
self._size = github.GithubObject.NotSet
|
||||
self._source = github.GithubObject.NotSet
|
||||
self._ssh_url = github.GithubObject.NotSet
|
||||
self._stargazers_url = github.GithubObject.NotSet
|
||||
self._statuses_url = github.GithubObject.NotSet
|
||||
self._subscribers_url = github.GithubObject.NotSet
|
||||
self._subscription_url = github.GithubObject.NotSet
|
||||
self._svn_url = github.GithubObject.NotSet
|
||||
self._tags_url = github.GithubObject.NotSet
|
||||
self._teams_url = github.GithubObject.NotSet
|
||||
self._trees_url = github.GithubObject.NotSet
|
||||
self._updated_at = github.GithubObject.NotSet
|
||||
self._url = github.GithubObject.NotSet
|
||||
self._watchers = github.GithubObject.NotSet
|
||||
self._watchers_count = github.GithubObject.NotSet
|
||||
|
||||
def _useAttributes(self, attributes):
|
||||
if "archive_url" in attributes: # pragma no branch
|
||||
assert attributes["archive_url"] is None or isinstance(attributes["archive_url"], (str, unicode)), attributes["archive_url"]
|
||||
self._archive_url = attributes["archive_url"]
|
||||
if "assignees_url" in attributes: # pragma no branch
|
||||
assert attributes["assignees_url"] is None or isinstance(attributes["assignees_url"], (str, unicode)), attributes["assignees_url"]
|
||||
self._assignees_url = attributes["assignees_url"]
|
||||
if "blobs_url" in attributes: # pragma no branch
|
||||
assert attributes["blobs_url"] is None or isinstance(attributes["blobs_url"], (str, unicode)), attributes["blobs_url"]
|
||||
self._blobs_url = attributes["blobs_url"]
|
||||
if "branches_url" in attributes: # pragma no branch
|
||||
assert attributes["branches_url"] is None or isinstance(attributes["branches_url"], (str, unicode)), attributes["branches_url"]
|
||||
self._branches_url = attributes["branches_url"]
|
||||
if "clone_url" in attributes: # pragma no branch
|
||||
assert attributes["clone_url"] is None or isinstance(attributes["clone_url"], (str, unicode)), attributes["clone_url"]
|
||||
self._clone_url = attributes["clone_url"]
|
||||
if "collaborators_url" in attributes: # pragma no branch
|
||||
assert attributes["collaborators_url"] is None or isinstance(attributes["collaborators_url"], (str, unicode)), attributes["collaborators_url"]
|
||||
self._collaborators_url = attributes["collaborators_url"]
|
||||
if "comments_url" in attributes: # pragma no branch
|
||||
assert attributes["comments_url"] is None or isinstance(attributes["comments_url"], (str, unicode)), attributes["comments_url"]
|
||||
self._comments_url = attributes["comments_url"]
|
||||
if "commits_url" in attributes: # pragma no branch
|
||||
assert attributes["commits_url"] is None or isinstance(attributes["commits_url"], (str, unicode)), attributes["commits_url"]
|
||||
self._commits_url = attributes["commits_url"]
|
||||
if "compare_url" in attributes: # pragma no branch
|
||||
assert attributes["compare_url"] is None or isinstance(attributes["compare_url"], (str, unicode)), attributes["compare_url"]
|
||||
self._compare_url = attributes["compare_url"]
|
||||
if "contents_url" in attributes: # pragma no branch
|
||||
assert attributes["contents_url"] is None or isinstance(attributes["contents_url"], (str, unicode)), attributes["contents_url"]
|
||||
self._contents_url = attributes["contents_url"]
|
||||
if "contributors_url" in attributes: # pragma no branch
|
||||
assert attributes["contributors_url"] is None or isinstance(attributes["contributors_url"], (str, unicode)), attributes["contributors_url"]
|
||||
self._contributors_url = attributes["contributors_url"]
|
||||
if "created_at" in attributes: # pragma no branch
|
||||
assert attributes["created_at"] is None or isinstance(attributes["created_at"], (str, unicode)), attributes["created_at"]
|
||||
self._created_at = self._parseDatetime(attributes["created_at"])
|
||||
if "default_branch" in attributes: # pragma no branch
|
||||
assert attributes["default_branch"] is None or isinstance(attributes["default_branch"], (str, unicode)), attributes["default_branch"]
|
||||
self._default_branch = attributes["default_branch"]
|
||||
if "description" in attributes: # pragma no branch
|
||||
assert attributes["description"] is None or isinstance(attributes["description"], (str, unicode)), attributes["description"]
|
||||
self._description = attributes["description"]
|
||||
if "downloads_url" in attributes: # pragma no branch
|
||||
assert attributes["downloads_url"] is None or isinstance(attributes["downloads_url"], (str, unicode)), attributes["downloads_url"]
|
||||
self._downloads_url = attributes["downloads_url"]
|
||||
if "events_url" in attributes: # pragma no branch
|
||||
assert attributes["events_url"] is None or isinstance(attributes["events_url"], (str, unicode)), attributes["events_url"]
|
||||
self._events_url = attributes["events_url"]
|
||||
if "fork" in attributes: # pragma no branch
|
||||
assert attributes["fork"] is None or isinstance(attributes["fork"], bool), attributes["fork"]
|
||||
self._fork = attributes["fork"]
|
||||
if "forks" in attributes: # pragma no branch
|
||||
assert attributes["forks"] is None or isinstance(attributes["forks"], (int, long)), attributes["forks"]
|
||||
self._forks = attributes["forks"]
|
||||
if "forks_count" in attributes: # pragma no branch
|
||||
assert attributes["forks_count"] is None or isinstance(attributes["forks_count"], (int, long)), attributes["forks_count"]
|
||||
self._forks_count = attributes["forks_count"]
|
||||
if "forks_url" in attributes: # pragma no branch
|
||||
assert attributes["forks_url"] is None or isinstance(attributes["forks_url"], (str, unicode)), attributes["forks_url"]
|
||||
self._forks_url = attributes["forks_url"]
|
||||
if "full_name" in attributes: # pragma no branch
|
||||
assert attributes["full_name"] is None or isinstance(attributes["full_name"], (str, unicode)), attributes["full_name"]
|
||||
self._full_name = attributes["full_name"]
|
||||
if "git_commits_url" in attributes: # pragma no branch
|
||||
assert attributes["git_commits_url"] is None or isinstance(attributes["git_commits_url"], (str, unicode)), attributes["git_commits_url"]
|
||||
self._git_commits_url = attributes["git_commits_url"]
|
||||
if "git_refs_url" in attributes: # pragma no branch
|
||||
assert attributes["git_refs_url"] is None or isinstance(attributes["git_refs_url"], (str, unicode)), attributes["git_refs_url"]
|
||||
self._git_refs_url = attributes["git_refs_url"]
|
||||
if "git_tags_url" in attributes: # pragma no branch
|
||||
assert attributes["git_tags_url"] is None or isinstance(attributes["git_tags_url"], (str, unicode)), attributes["git_tags_url"]
|
||||
self._git_tags_url = attributes["git_tags_url"]
|
||||
if "git_url" in attributes: # pragma no branch
|
||||
assert attributes["git_url"] is None or isinstance(attributes["git_url"], (str, unicode)), attributes["git_url"]
|
||||
self._git_url = attributes["git_url"]
|
||||
@@ -1632,24 +2046,63 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
if "homepage" in attributes: # pragma no branch
|
||||
assert attributes["homepage"] is None or isinstance(attributes["homepage"], (str, unicode)), attributes["homepage"]
|
||||
self._homepage = attributes["homepage"]
|
||||
if "hooks_url" in attributes: # pragma no branch
|
||||
assert attributes["hooks_url"] is None or isinstance(attributes["hooks_url"], (str, unicode)), attributes["hooks_url"]
|
||||
self._hooks_url = attributes["hooks_url"]
|
||||
if "html_url" in attributes: # pragma no branch
|
||||
assert attributes["html_url"] is None or isinstance(attributes["html_url"], (str, unicode)), attributes["html_url"]
|
||||
self._html_url = attributes["html_url"]
|
||||
if "id" in attributes: # pragma no branch
|
||||
assert attributes["id"] is None or isinstance(attributes["id"], (int, long)), attributes["id"]
|
||||
self._id = attributes["id"]
|
||||
if "issue_comment_url" in attributes: # pragma no branch
|
||||
assert attributes["issue_comment_url"] is None or isinstance(attributes["issue_comment_url"], (str, unicode)), attributes["issue_comment_url"]
|
||||
self._issue_comment_url = attributes["issue_comment_url"]
|
||||
if "issue_events_url" in attributes: # pragma no branch
|
||||
assert attributes["issue_events_url"] is None or isinstance(attributes["issue_events_url"], (str, unicode)), attributes["issue_events_url"]
|
||||
self._issue_events_url = attributes["issue_events_url"]
|
||||
if "issues_url" in attributes: # pragma no branch
|
||||
assert attributes["issues_url"] is None or isinstance(attributes["issues_url"], (str, unicode)), attributes["issues_url"]
|
||||
self._issues_url = attributes["issues_url"]
|
||||
if "keys_url" in attributes: # pragma no branch
|
||||
assert attributes["keys_url"] is None or isinstance(attributes["keys_url"], (str, unicode)), attributes["keys_url"]
|
||||
self._keys_url = attributes["keys_url"]
|
||||
if "labels_url" in attributes: # pragma no branch
|
||||
assert attributes["labels_url"] is None or isinstance(attributes["labels_url"], (str, unicode)), attributes["labels_url"]
|
||||
self._labels_url = attributes["labels_url"]
|
||||
if "language" in attributes: # pragma no branch
|
||||
assert attributes["language"] is None or isinstance(attributes["language"], (str, unicode)), attributes["language"]
|
||||
self._language = attributes["language"]
|
||||
if "languages_url" in attributes: # pragma no branch
|
||||
assert attributes["languages_url"] is None or isinstance(attributes["languages_url"], (str, unicode)), attributes["languages_url"]
|
||||
self._languages_url = attributes["languages_url"]
|
||||
if "master_branch" in attributes: # pragma no branch
|
||||
assert attributes["master_branch"] is None or isinstance(attributes["master_branch"], (str, unicode)), attributes["master_branch"]
|
||||
self._master_branch = attributes["master_branch"]
|
||||
if "merges_url" in attributes: # pragma no branch
|
||||
assert attributes["merges_url"] is None or isinstance(attributes["merges_url"], (str, unicode)), attributes["merges_url"]
|
||||
self._merges_url = attributes["merges_url"]
|
||||
if "milestones_url" in attributes: # pragma no branch
|
||||
assert attributes["milestones_url"] is None or isinstance(attributes["milestones_url"], (str, unicode)), attributes["milestones_url"]
|
||||
self._milestones_url = attributes["milestones_url"]
|
||||
if "mirror_url" in attributes: # pragma no branch
|
||||
assert attributes["mirror_url"] is None or isinstance(attributes["mirror_url"], (str, unicode)), attributes["mirror_url"]
|
||||
self._mirror_url = attributes["mirror_url"]
|
||||
if "name" in attributes: # pragma no branch
|
||||
assert attributes["name"] is None or isinstance(attributes["name"], (str, unicode)), attributes["name"]
|
||||
self._name = attributes["name"]
|
||||
if "network_count" in attributes: # pragma no branch
|
||||
assert attributes["network_count"] is None or isinstance(attributes["network_count"], (int, long)), attributes["network_count"]
|
||||
self._network_count = attributes["network_count"]
|
||||
if "notifications_url" in attributes: # pragma no branch
|
||||
assert attributes["notifications_url"] is None or isinstance(attributes["notifications_url"], (str, unicode)), attributes["notifications_url"]
|
||||
self._notifications_url = attributes["notifications_url"]
|
||||
if "open_issues" in attributes: # pragma no branch
|
||||
assert attributes["open_issues"] is None or isinstance(attributes["open_issues"], (int, long)), attributes["open_issues"]
|
||||
self._open_issues = attributes["open_issues"]
|
||||
if "open_issues_count" in attributes: # pragma no branch
|
||||
assert attributes["open_issues_count"] is None or isinstance(attributes["open_issues_count"], (int, long)), attributes["open_issues_count"]
|
||||
self._open_issues_count = attributes["open_issues_count"]
|
||||
if "organization" in attributes: # pragma no branch
|
||||
assert attributes["organization"] is None or isinstance(attributes["organization"], dict), attributes["organization"]
|
||||
self._organization = None if attributes["organization"] is None else github.Organization.Organization(self._requester, self._headers, attributes["organization"], completed=False)
|
||||
@@ -1665,6 +2118,9 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
if "private" in attributes: # pragma no branch
|
||||
assert attributes["private"] is None or isinstance(attributes["private"], bool), attributes["private"]
|
||||
self._private = attributes["private"]
|
||||
if "pulls_url" in attributes: # pragma no branch
|
||||
assert attributes["pulls_url"] is None or isinstance(attributes["pulls_url"], (str, unicode)), attributes["pulls_url"]
|
||||
self._pulls_url = attributes["pulls_url"]
|
||||
if "pushed_at" in attributes: # pragma no branch
|
||||
assert attributes["pushed_at"] is None or isinstance(attributes["pushed_at"], (str, unicode)), attributes["pushed_at"]
|
||||
self._pushed_at = self._parseDatetime(attributes["pushed_at"])
|
||||
@@ -1677,9 +2133,30 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
if "ssh_url" in attributes: # pragma no branch
|
||||
assert attributes["ssh_url"] is None or isinstance(attributes["ssh_url"], (str, unicode)), attributes["ssh_url"]
|
||||
self._ssh_url = attributes["ssh_url"]
|
||||
if "stargazers_url" in attributes: # pragma no branch
|
||||
assert attributes["stargazers_url"] is None or isinstance(attributes["stargazers_url"], (str, unicode)), attributes["stargazers_url"]
|
||||
self._stargazers_url = attributes["stargazers_url"]
|
||||
if "statuses_url" in attributes: # pragma no branch
|
||||
assert attributes["statuses_url"] is None or isinstance(attributes["statuses_url"], (str, unicode)), attributes["statuses_url"]
|
||||
self._statuses_url = attributes["statuses_url"]
|
||||
if "subscribers_url" in attributes: # pragma no branch
|
||||
assert attributes["subscribers_url"] is None or isinstance(attributes["subscribers_url"], (str, unicode)), attributes["subscribers_url"]
|
||||
self._subscribers_url = attributes["subscribers_url"]
|
||||
if "subscription_url" in attributes: # pragma no branch
|
||||
assert attributes["subscription_url"] is None or isinstance(attributes["subscription_url"], (str, unicode)), attributes["subscription_url"]
|
||||
self._subscription_url = attributes["subscription_url"]
|
||||
if "svn_url" in attributes: # pragma no branch
|
||||
assert attributes["svn_url"] is None or isinstance(attributes["svn_url"], (str, unicode)), attributes["svn_url"]
|
||||
self._svn_url = attributes["svn_url"]
|
||||
if "tags_url" in attributes: # pragma no branch
|
||||
assert attributes["tags_url"] is None or isinstance(attributes["tags_url"], (str, unicode)), attributes["tags_url"]
|
||||
self._tags_url = attributes["tags_url"]
|
||||
if "teams_url" in attributes: # pragma no branch
|
||||
assert attributes["teams_url"] is None or isinstance(attributes["teams_url"], (str, unicode)), attributes["teams_url"]
|
||||
self._teams_url = attributes["teams_url"]
|
||||
if "trees_url" in attributes: # pragma no branch
|
||||
assert attributes["trees_url"] is None or isinstance(attributes["trees_url"], (str, unicode)), attributes["trees_url"]
|
||||
self._trees_url = attributes["trees_url"]
|
||||
if "updated_at" in attributes: # pragma no branch
|
||||
assert attributes["updated_at"] is None or isinstance(attributes["updated_at"], (str, unicode)), attributes["updated_at"]
|
||||
self._updated_at = self._parseDatetime(attributes["updated_at"])
|
||||
@@ -1689,3 +2166,6 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
if "watchers" in attributes: # pragma no branch
|
||||
assert attributes["watchers"] is None or isinstance(attributes["watchers"], (int, long)), attributes["watchers"]
|
||||
self._watchers = attributes["watchers"]
|
||||
if "watchers_count" in attributes: # pragma no branch
|
||||
assert attributes["watchers_count"] is None or isinstance(attributes["watchers_count"], (int, long)), attributes["watchers_count"]
|
||||
self._watchers_count = attributes["watchers_count"]
|
||||
|
||||
@@ -53,6 +53,14 @@ class Team(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._members_count)
|
||||
return self._NoneIfNotSet(self._members_count)
|
||||
|
||||
@property
|
||||
def members_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._members_url)
|
||||
return self._NoneIfNotSet(self._members_url)
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""
|
||||
@@ -77,6 +85,22 @@ class Team(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._repos_count)
|
||||
return self._NoneIfNotSet(self._repos_count)
|
||||
|
||||
@property
|
||||
def repositories_url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._repositories_url)
|
||||
return self._NoneIfNotSet(self._repositories_url)
|
||||
|
||||
@property
|
||||
def slug(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._slug)
|
||||
return self._NoneIfNotSet(self._slug)
|
||||
|
||||
@property
|
||||
def url(self):
|
||||
"""
|
||||
@@ -221,9 +245,12 @@ class Team(github.GithubObject.CompletableGithubObject):
|
||||
def _initAttributes(self):
|
||||
self._id = github.GithubObject.NotSet
|
||||
self._members_count = github.GithubObject.NotSet
|
||||
self._members_url = github.GithubObject.NotSet
|
||||
self._name = github.GithubObject.NotSet
|
||||
self._permission = github.GithubObject.NotSet
|
||||
self._repos_count = github.GithubObject.NotSet
|
||||
self._repositories_url = github.GithubObject.NotSet
|
||||
self._slug = github.GithubObject.NotSet
|
||||
self._url = github.GithubObject.NotSet
|
||||
|
||||
def _useAttributes(self, attributes):
|
||||
@@ -233,6 +260,9 @@ class Team(github.GithubObject.CompletableGithubObject):
|
||||
if "members_count" in attributes: # pragma no branch
|
||||
assert attributes["members_count"] is None or isinstance(attributes["members_count"], (int, long)), attributes["members_count"]
|
||||
self._members_count = attributes["members_count"]
|
||||
if "members_url" in attributes: # pragma no branch
|
||||
assert attributes["members_url"] is None or isinstance(attributes["members_url"], (str, unicode)), attributes["members_url"]
|
||||
self._members_url = attributes["members_url"]
|
||||
if "name" in attributes: # pragma no branch
|
||||
assert attributes["name"] is None or isinstance(attributes["name"], (str, unicode)), attributes["name"]
|
||||
self._name = attributes["name"]
|
||||
@@ -242,6 +272,12 @@ class Team(github.GithubObject.CompletableGithubObject):
|
||||
if "repos_count" in attributes: # pragma no branch
|
||||
assert attributes["repos_count"] is None or isinstance(attributes["repos_count"], (int, long)), attributes["repos_count"]
|
||||
self._repos_count = attributes["repos_count"]
|
||||
if "repositories_url" in attributes: # pragma no branch
|
||||
assert attributes["repositories_url"] is None or isinstance(attributes["repositories_url"], (str, unicode)), attributes["repositories_url"]
|
||||
self._repositories_url = attributes["repositories_url"]
|
||||
if "slug" in attributes: # pragma no branch
|
||||
assert attributes["slug"] is None or isinstance(attributes["slug"], (str, unicode)), attributes["slug"]
|
||||
self._slug = attributes["slug"]
|
||||
if "url" in attributes: # pragma no branch
|
||||
assert attributes["url"] is None or isinstance(attributes["url"], (str, unicode)), attributes["url"]
|
||||
self._url = attributes["url"]
|
||||
|
||||
@@ -69,6 +69,7 @@ from Logging_ import *
|
||||
from RawData import *
|
||||
from ConditionalRequestUpdate import *
|
||||
from Persistence import *
|
||||
from ExposeAllAttributes import *
|
||||
|
||||
from Issue33 import *
|
||||
from Issue50 import *
|
||||
|
||||
@@ -0,0 +1,160 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
############################ Copyrights and license ############################
|
||||
# #
|
||||
# Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> #
|
||||
# #
|
||||
# This file is part of PyGithub. http://jacquev6.github.com/PyGithub/ #
|
||||
# #
|
||||
# PyGithub is free software: you can redistribute it and/or modify it under #
|
||||
# the terms of the GNU Lesser General Public License as published by the Free #
|
||||
# Software Foundation, either version 3 of the License, or (at your option) #
|
||||
# any later version. #
|
||||
# #
|
||||
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
|
||||
# details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU Lesser General Public License #
|
||||
# along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
|
||||
# #
|
||||
################################################################################
|
||||
|
||||
import Framework
|
||||
|
||||
|
||||
class ExposeAllAttributes(Framework.TestCase):
|
||||
def testAllClasses(self):
|
||||
authenticatedUser = self.g.get_user()
|
||||
namedUser = self.g.get_user("nvie")
|
||||
repository = authenticatedUser.get_repo("PyGithub")
|
||||
organization = self.g.get_organization("BeaverSoftware")
|
||||
plan = authenticatedUser.plan
|
||||
branch = repository.get_branch("master")
|
||||
commit = repository.get_commit("1292bf0e22c796e91cc3d6e24b544aece8c21f2a")
|
||||
commitStats = commit.stats
|
||||
commitStatus = commit.get_statuses()[0]
|
||||
milestone = repository.get_milestone(17)
|
||||
gist = self.g.get_gist("149016")
|
||||
gistComment = gist.get_comment(4565)
|
||||
gistFile = gist.files[".gitignore"]
|
||||
gistHistoryState = gist.history[0]
|
||||
gitCommit = repository.get_git_commit("be37b8a7f3a68631c32672dcd84d9eba27438ee6")
|
||||
gitAuthor = gitCommit.author
|
||||
gitTree = repository.get_git_tree("6f7c2d8c66d78863f7b91792deaead619799a1ce")
|
||||
gitTreeElement = gitTree.tree[0]
|
||||
gitBlob = repository.get_git_blob("681fb61f1761743a02f5c790f1c762cbfe8cfad1")
|
||||
gitRef = repository.get_git_ref("tags/v1.17.0")
|
||||
gitObject = gitRef.object
|
||||
issue = repository.get_issue(188)
|
||||
issueComment = issue.get_comment(22686536)
|
||||
issueEvent = issue.get_events()[0]
|
||||
issuePullRequest = issue.pull_request
|
||||
gitignoreTemplate = self.g.get_gitignore_template("Python")
|
||||
team = organization.get_team(141487)
|
||||
label = repository.get_label("Bug")
|
||||
pullRequest = repository.get_pull(31)
|
||||
pullRequestComment = pullRequest.get_review_comment(1580134)
|
||||
pullRequestPart = pullRequest.base
|
||||
file = pullRequest.get_files()[0]
|
||||
commitComment = repository.get_comment(3630301)
|
||||
status = self.g.get_api_status()
|
||||
statusMessage = self.g.get_last_api_status_message()
|
||||
rateLimit = self.g.get_rate_limit()
|
||||
rate = rateLimit.rate
|
||||
hook = repository.get_hooks()[0]
|
||||
hookResponse = hook.last_response
|
||||
hookDescription = self.g.get_hooks()[0]
|
||||
comparison = repository.compare("master", "develop")
|
||||
contentFile = repository.get_file_contents("README.rst")
|
||||
permissions = repository.permissions
|
||||
event = repository.get_events()[0]
|
||||
notification = authenticatedUser.get_notification("8406712")
|
||||
notificationSubject = notification.subject
|
||||
|
||||
missingAttributes = self.gatherMissingAttributes([
|
||||
authenticatedUser,
|
||||
# authorization, # Security issue if put as-is in ReplayData
|
||||
# authorizationApplication, # Security issue if put as-is in ReplayData
|
||||
branch,
|
||||
commit,
|
||||
commitComment,
|
||||
commitStats,
|
||||
commitStatus,
|
||||
comparison,
|
||||
contentFile,
|
||||
# download, # Deprecated: https://github.com/blog/1302-goodbye-uploads
|
||||
event,
|
||||
file,
|
||||
gist,
|
||||
gistComment,
|
||||
gistFile,
|
||||
gistHistoryState,
|
||||
gitAuthor,
|
||||
gitBlob,
|
||||
gitCommit,
|
||||
gitignoreTemplate,
|
||||
gitObject,
|
||||
gitRef,
|
||||
# gitTag,
|
||||
gitTree,
|
||||
gitTreeElement,
|
||||
hook,
|
||||
hookDescription,
|
||||
hookResponse,
|
||||
issue,
|
||||
issueComment,
|
||||
issueEvent,
|
||||
issuePullRequest,
|
||||
label,
|
||||
milestone,
|
||||
namedUser,
|
||||
notification,
|
||||
notificationSubject,
|
||||
organization,
|
||||
permissions,
|
||||
plan,
|
||||
pullRequest,
|
||||
pullRequestComment,
|
||||
# pullRequestMergeStatus, # Only obtained when merging a pull request through the API
|
||||
pullRequestPart,
|
||||
rate,
|
||||
rateLimit,
|
||||
repository,
|
||||
# repositoryKey, # Security issue if put as-is in ReplayData
|
||||
status,
|
||||
statusMessage,
|
||||
# tag,
|
||||
team,
|
||||
# userKey, # Security issue if put as-is in ReplayData
|
||||
])
|
||||
|
||||
for className, attributesMissingInClass in sorted(missingAttributes.iteritems()):
|
||||
for attrName, value in sorted(attributesMissingInClass.iteritems()):
|
||||
print className, attrName, "->", repr(value)
|
||||
|
||||
self.assertEqual(sum(len(attrs) for attrs in missingAttributes.values()), 0)
|
||||
|
||||
def findMissingAttributes(self, obj):
|
||||
if hasattr(obj, "update"):
|
||||
obj.update()
|
||||
className = obj.__class__.__name__
|
||||
missingAttributes = {}
|
||||
for attribute in obj.raw_data:
|
||||
if attribute != "_links":
|
||||
if not hasattr(obj, attribute):
|
||||
missingAttributes[attribute] = obj.raw_data[attribute]
|
||||
return (className, missingAttributes)
|
||||
|
||||
def gatherMissingAttributes(self, objs):
|
||||
allMissingAttributes = dict()
|
||||
|
||||
for obj in objs:
|
||||
className, attributesMissingInClass = self.findMissingAttributes(obj)
|
||||
if len(attributesMissingInClass) > 0:
|
||||
if className not in allMissingAttributes:
|
||||
allMissingAttributes[className] = dict()
|
||||
allMissingAttributes[className].update(attributesMissingInClass)
|
||||
|
||||
return allMissingAttributes
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user