I recently wrote this function for downloading files from GH private repos. The GH API restricts downloads from the /contents endpoint to 1MB. One can get the file from the /blob endpoint, but that first requires querying the /commit endpoint to get the file SHA. The function wraps all this so you can just drop the URL of a file in a private repo and download the file using gh's auth infrastructure. Would you be interested in it as a PR? It needs a good home.
https://gist.github.com/noamross/73944d85cad545ae89efaa4d90b049db
I recently wrote this function for downloading files from GH private repos. The GH API restricts downloads from the
/contentsendpoint to 1MB. One can get the file from the/blobendpoint, but that first requires querying the/commitendpoint to get the file SHA. The function wraps all this so you can just drop the URL of a file in a private repo and download the file using gh's auth infrastructure. Would you be interested in it as a PR? It needs a good home.https://gist.github.com/noamross/73944d85cad545ae89efaa4d90b049db