adds support for content dirs

This commit is contained in:
Jannis Gebauer
2016-09-15 14:22:22 +02:00
parent 4a657d67f8
commit 0799753530
3 changed files with 22 additions and 0 deletions
+5
View File
@@ -1235,6 +1235,11 @@ class Repository(github.GithubObject.CompletableGithubObject):
self.url + "/contents" + path,
parameters=url_parameters
)
if isinstance(data, list):
return [
github.ContentFile.ContentFile(self._requester, headers, item, completed=False)
for item in data
]
return github.ContentFile.ContentFile(self._requester, headers, data, completed=True)
def create_file(self, path, message, content,