-
Notifications
You must be signed in to change notification settings - Fork 60
feat(git-clone): add support for tree github or gitlab clone url #210
Conversation
@matifali - i can change the tests that does real clones to a different repo. Or remove them. If this looks good, i can add some docs with examples. Bitbucket urls are a bit strange, so i will need to think about a clean way. |
@michaelbrewer Thank you for this excellent contribution. This PR will significantly enhance the module's utility and allow users to use coder in many new ways. I won't be able to look at the specifics and have requested @mafredri and @code-asher to review the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a really cool feature, nice work. And thanks for adding all those tests.
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
I have made some changes to allow for more flexibility. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we just need to update some references in the docs, then this looks good to me.
Co-authored-by: Asher <ash@coder.com>
Co-authored-by: Asher <ash@coder.com>
Co-authored-by: Asher <ash@coder.com>
@code-asher - feel free to use different urls for the integration tests. I will leave my repos up so long :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank you!
Ohh yeah good point, we should probably use some Coder repos at some point...easy enough for GitHub but unfortunately I think we do not have anything on Gitlab at the moment. |
@code-asher, could you please merge this if there are no more suggestions? |
Allow for git clone urls to include branch names like for gitlab / github urls with "tree".
Changes
https://github.com/org.name/repo-name.fun/tree/feat/branch
)https://gitlab.com/group/sub-group/sub-sub-group/repo-name.fun/-/tree/feat/branch
)?ref_type=heads
#example
web_url
in the output, for both HTTP and SSH git clone urlsGithub clone with branch name
To github clone a url at a specific branch like
feat/example
Self host github
Gitlab clone with branch name
To gitlab clone a url at a specific branch like
feat/example
Self host gitlab
closes #212