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. added
    enhancement
    on Feb 12, 2020
  2. 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.

  3. 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

  4. code-asher commented on Feb 14, 2020

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

    @dougnukem

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

  6. 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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions