jupyterlab / jupyterlab/jupyterlab-github

Use the token provided in the settings for frontend issued requests

Open
#155 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
437
Forks
101
PR merge metrics
No merged PRs in 30d

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:

https://github.com/jupyterlab/jupyterlab-github/blob/6ab46858aa5dc0b93510b8fdb52e9066178847ea/src/contents.ts#L542-L550

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](https://github.com/jupyterlab/jupyterlab-github/assets/591645/2238cba4-efa2-4bf9-8d97-268a34a727a3)

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in src/contents.ts around lines 542-550 and compare requests made through the server extension with frontend-only requests. Reproduce the issue in the linked JupyterLite deployment using a token from settings; done means frontend-issued GitHub API requests use that token when the server extension is absent.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, typescript
Domain
api, authentication, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.