Giter Club home page Giter Club logo

Comments (7)

ian-r-rose avatar ian-r-rose commented on August 11, 2024

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.

rlizzo avatar rlizzo commented on August 11, 2024

Thanks for the quick reply!

from jupyterlab-github.

dhirschfeld avatar dhirschfeld commented on August 11, 2024

I think this can be done using access tokens however there are two separate endpoints, one for a user and another for organizations:

from jupyterlab-github.

ian-r-rose avatar ian-r-rose commented on August 11, 2024

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.

ian-r-rose avatar ian-r-rose commented on August 11, 2024

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:

  1. Check /user to see if there is a user currently authenticated with a personal access token.
  2. If yes, go to /users/repos?affiliation=owner...
  3. If no: check orgs/<ORGANIZATION>
  4. 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.

dhirschfeld avatar dhirschfeld commented on August 11, 2024

Yeah, it's a pain that the users/:username/repos endpoint doesn't just have a flag to control repo visibility:
image

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.

ian-r-rose avatar ian-r-rose commented on August 11, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.