jupyterlab / pull-requests

A JupyterLab extension for reviewing GitHub pull requests
BSD 3-Clause "New" or "Revised" License
37 stars 18 forks source link

Use Database API in GitHubManager to handle larger files #71

Open yyykt opened 2 years ago

yyykt commented 2 years ago

Problem

Currently, GitHubManager uses Contents API to obtain file diffs from GitHub. Since this API only supports files up to 1 MB, the following error was displayed when I tried to review a notebook with some image outputs.

Load File Error (Invalid response: 403 This API returns blobs up to 1 MB in size. The requested blob is too large to fetch via the API, but you can use the Git Data API to request blobs up to 100 MB in size.)

Proposed Solution

I think this situation can be solved by using Database API instead, which supports blobs up to 100 MB.

Additional context

welcome[bot] commented 2 years ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

bollwyvl commented 2 years ago

Sure, this sounds good to investigate. Note, of course, that a lot of visual features start to break down with assets of large size when viewed in the browser, so anything that starts to get close to that 100mb is not going to feel very responsive...