jupyterlab / jupyterlab/pull-requests

Use Database API in GitHubManager to handle larger files

Open
#71 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
38
Forks
16
PR merge metrics
No merged PRs in 30d

Description

### 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.

[GitHubManager]: ../blob/master/jupyterlab_pullrequests/managers/github.py
[Contents API]: https://docs.github.com/en/rest/reference/repos#contents

> 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.

[Database API]: https://docs.github.com/en/rest/reference/git

### Additional context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.