Skip to content

Download file function for large files/private repos #1

@noamross

Description

@noamross

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions