Skip to content
This repository was archived by the owner on Apr 28, 2020. It is now read-only.
This repository was archived by the owner on Apr 28, 2020. It is now read-only.

Remove github.com requirement #197

Open

Description

@teddy-codes

Currently, there is a GitHub SDK within the code. If there is no .sail/Dockerfile, the base codercom/ubuntu-dev image should be used.

Activity

  1. teddy-codes commented on May 23, 2019

    @teddy-codes
    ContributorAuthor

    /cc @nathanpotter @ammario

    What are your thoughts on this?
    Re: #196

  2. nathanpotter commented on May 23, 2019

    @nathanpotter
    Contributor

    I think it'd be better to just verify that the repo host is github before making the call to the API

  3. teddy-codes commented on May 24, 2019

    @teddy-codes
    ContributorAuthor

    will throw together a PR tomorrow.

  4. coadler commented on May 24, 2019

    @coadler
    Contributor

    This might be tricky since you'll have to parse the .git folder in the project for the host

  5. teddy-codes commented on May 24, 2019

    @teddy-codes
    ContributorAuthor

    Can't we just add a regex for github.com?

  6. coadler commented on May 24, 2019

    @coadler
    Contributor

    I think that sets a bad precedent if we want to add logic based on the host

  7. teddy-codes commented on May 24, 2019

    @teddy-codes
    ContributorAuthor

    I think this will actually be kind of tricky now that you bring it up.

    What are your thoughts on how to proceed?

  8. coadler commented on May 24, 2019

    @coadler
    Contributor

    I think a good first step would be to see how janky extracting the host from the .git folder would be

  9. teddy-codes commented on May 24, 2019

    @teddy-codes
    ContributorAuthor

    wouldn't we be able to just run:

    git remote -v

    This would display all of the hosts, we could split by \n, then use the endpoints there?

    Note:
    This would mean that if any of the repositories were on GitHub, this would happen. Although, it is likely that if it is, then there is no problem.

  10. deansheather commented on May 24, 2019

    @deansheather
    Contributor

    .git/config is where git stores all of the remotes in a format that seems ini-ish:

    ...
    [remote "origin"]
            url = git@github.com:cdr/sail.git
            fetch = +refs/heads/*:refs/remotes/origin/*
    ...
    

    I think it'd be much easier to just parse the output of git directly as roberthmiller pointed out, as if they're working with Git in the first place it's very likely that they have git installed on their system.

  11. teddy-codes commented on May 24, 2019

    @teddy-codes
    ContributorAuthor

    We could always check (although, a prerequisite to sail is git)

  12. coadler commented on May 24, 2019

    @coadler
    Contributor
  13. teddy-codes commented on May 24, 2019

    @teddy-codes
    ContributorAuthor

    So, what do you think that the solution should be? Should we have a regex for the remotes? If there is a GitHub* remote, we should use it. Is that an ideal solution? Although, this solution is not very good since you can have a remote that looks like git:cdr/sail and it would be aliased as github.com in the ssh config. What are your thoughts on this?

  14. deansheather commented on May 25, 2019

    @deansheather
    Contributor

    I think just parse the output of git remote -v if git is exists, and if it has a URL beginning with https://github.com/ or git@github.com: then try to get the language from GitHub. If people have aliased GitHub to something else it won't work, but I don't think many people do that anyways.

  15. teddy-codes commented on May 25, 2019

    @teddy-codes
    ContributorAuthor

    ok, I will put together a PR together when I get sail to work on my mac (since I am away from my desktop).

  16. teddy-codes commented on Jun 20, 2019

    @teddy-codes
    ContributorAuthor

    @kami1019 Not sure what your problem is... Can you elaborate a little bit?

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions