-
-
Notifications
You must be signed in to change notification settings - Fork 105
Description
Problem
Currently, if the frontend part of the jupyterlab-github
extension is used only (like in JupyterLite), the token provided via the settings does not seem to be taken into account.
This is likely because the token is appended to the URL only if the proxy (server extension) is used, and the real GitHub request made from the server extension:
jupyterlab-github/src/contents.ts
Lines 542 to 550 in 6ab4685
if (result === true) { | |
requestUrl = URLExt.join(this._serverSettings.baseUrl, 'github'); | |
// add the access token if defined | |
if (this.accessToken) { | |
params['access_token'] = this.accessToken; | |
} | |
} else { | |
requestUrl = DEFAULT_GITHUB_API_URL; | |
} |
In the following screencast we see there is no information about the provided token in the requests to the GitHub API:
jupyterlab-github-request-notoken.webm
Proposed Solution
It would be useful to allow for using the token also for requests made from the JupyterLab UI directly, in scenarios where the server extension is not installed.
Additional context
This can be tested using a JupyterLite deployment with jupyterlab-github
installed, for example: https://jupyterlite.readthedocs.io/en/stable/_static/lab/index.html
cc @rpwagner since we were looking into this in-person yesterday at the Jupyter Open Studio Day in NYC