Add previous_filename property to File

This commit is contained in:
Jeffrey Melvin
2016-06-28 10:06:54 -05:00
parent a1f3de244d
commit e1be1e634d
+10
View File
@@ -81,6 +81,13 @@ class File(github.GithubObject.NonCompletableGithubObject):
"""
return self._patch.value
@property
def previous_filename(self):
"""
:type: string
"""
return self._previous_filename.value
@property
def raw_url(self):
"""
@@ -110,6 +117,7 @@ class File(github.GithubObject.NonCompletableGithubObject):
self._deletions = github.GithubObject.NotSet
self._filename = github.GithubObject.NotSet
self._patch = github.GithubObject.NotSet
self._previous_filename = github.GithubObject.NotSet
self._raw_url = github.GithubObject.NotSet
self._sha = github.GithubObject.NotSet
self._status = github.GithubObject.NotSet
@@ -129,6 +137,8 @@ class File(github.GithubObject.NonCompletableGithubObject):
self._filename = self._makeStringAttribute(attributes["filename"])
if "patch" in attributes: # pragma no branch
self._patch = self._makeStringAttribute(attributes["patch"])
if "previous_filename" in attributes: # pragma no branch
self._previous_filename = self._makeStringAttribute(attributes["previous_filename"])
if "raw_url" in attributes: # pragma no branch
self._raw_url = self._makeStringAttribute(attributes["raw_url"])
if "sha" in attributes: # pragma no branch