github3.py
github3.py copied to clipboard
Allow preventing file contents retrieval to enable updating large files
Please allow creating a file_contents
object without retrieving the current contents. This is because GitHub's contents API only supports retrieving files up to 1mb, and I need to update a file that is larger than 1mb but not necessarily read it. I would suggest the following syntax: repo.file_contents('folder/myfile.txt', retrieve=False)
. Attempting to access file contents on an object without it's contents retrieved yet could either attempt to retrieve and return the contents, return None
, or throw an exception. Manual retreival could be attempted with .retrieve()
. #741 is a slightly related issue. Thanks!