Skip to content

Directly open github repo through repo link #1355

Closed

Description

@JalinWang

I'm very fond of Gitpod, which supports opening a GitHub repo by prefixing any public GitHub or GitLab URL with gitpod.io/# in the browser.
e.g.: https://www.gitpod.io/#https://github.com/cdr/code-server

I want to add this feature to this project but have no idea how and where to start.
My initial thought is to add a rule to the URL parser in the patch, once the URL matched, execute "git clone" and then open.
But later I realized this feature requires git, would it be better to implement this feature as an extension? If yes, use UriHandler API?
or any other better solution?

Activity

  1. code-asher commented on Feb 12, 2020

    @code-asher
    Member

    This would be cool. I don't think we'd need to patch anything to get it working. Maybe if the ?folder parameter is something like git://github.com/cdr/code-server URL we clone before starting VS Code. We need to fix #1294 first though.

  2. JalinWang commented on Feb 14, 2020

    @JalinWang
    Author

    Is it a good way to execute "git clone" in server.preHandleRequest() and then modify MainServer.handleRequest() to call getRoot() with proper path?
    Pass a repo link in a form like http://code-server-domain.com/github?xxxxx
    P.S.:
    class Server and class MainServer refer to the ones in https://github.com/cdr/code-server/blob/master/src/node/server.ts

  3. code-asher commented on Feb 14, 2020

    @code-asher
    Member
  4. dougnukem commented on Mar 11, 2020

    @dougnukem

    Sail by coder supports this use case with the browser extension:

  5. kylecarbs commented on Apr 14, 2020

    @kylecarbs
    Member

    Closing for now.

    We don't have immediate plans for this within code-server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSome improvement that isn't a feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions