Comments (7)
Hi @rlizzo, private repository access is not currently supported. In order to do this, we would probably need to set it up as a full-fledged OAuth application (as opposed to the impoverished sort that it currently is). This is something that we would like to get up and running, but there is nothing in the works for it at the moment.
from jupyterlab-github.
Thanks for the quick reply!
from jupyterlab-github.
I think this can be done using access tokens however there are two separate endpoints, one for a user and another for organizations:
/user/repos?affiliation=owner&access_token=<ACCESS_TOKEN>
/orgs/<ORGANIZATION>/repos?access_token=<ACCESS_TOKEN>
from jupyterlab-github.
I think you are right about the access tokens @dhirschfeld.
It's not well documented, but from my experimentation, it seems like the public user/repos
endpoint works on both orgs and individual users, so that is what is used in this extension. Do you think it is different for enterprise?
from jupyterlab-github.
I take back what I said above. @dhirschfeld is completely right, that we need to use two different endpoints to get at public/private repos for organizations and for users. We would still like the frontend to behave the same for both, so it will be kind of tricky, but I think we can do a flow that does something like:
- Check
/user
to see if there is a user currently authenticated with a personal access token. - If yes, go to
/users/repos?affiliation=owner...
- If no: check
orgs/<ORGANIZATION>
- If that fails, then we are looking at another user. Check
users/<USERNAME>/repos
It will be more complex, and require more requests to the server, but I think it is worth it to get private repo access.
from jupyterlab-github.
Yeah, it's a pain that the users/:username/repos
endpoint doesn't just have a flag to control repo visibility:
AFAICS listing private repos therefore entails knowing the type of user/org you're trying to list which will significantly complicate the implementation. Nothing is impossible though...
from jupyterlab-github.
Once #47 is merged, I think I should be able to do the necessary stuff on the frontend to make it work with private repos.
from jupyterlab-github.
Related Issues (20)
- ValueError: The extension does not support current version od JupyterLab HOT 1
- Add Copy & Paste for files and directories HOT 4
- Ability to enter notebook URL (Enhancement)
- RuntimeError: npm dependencies failed to install
- Extension shows a subset of repos owned by a user HOT 1
- jupyterlab-sql is outdated
- Cannot see private repositories. HOT 1
- ValueError: The extension "@jupyterlab/github" does not yet support the current version of JupyterLab. HOT 4
- Can the license file be packaged in? HOT 2
- I can't search the repositories HOT 1
- migrate github extension to run with jupyterlab 4 HOT 1
- Rename the default branch to `main` HOT 2
- Add releaser tokens to the repo HOT 9
- Missing icons and styling issues in version 4
- Use the token provided in the settings for frontend issued requests
- Config option `client_id` not recognized by `GitHubConfig` HOT 5
- JupyterLab failed to build Error: Cannot find module './_baseValues' HOT 1
- Github deprecation notice HOT 5
- RuntimeError: JupyterLab failed to build HOT 5
- [GitHub] Deprecation Notice
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jupyterlab-github.