Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further improve repository string detection for open command #264

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jeremyhager
Copy link

@jeremyhager jeremyhager commented Sep 24, 2024

This further improves upon the existing repo name detection here: #233

While the current code works for https:// and git@, it does not work for those who use a ssh://git@ prefix:

example:

❯ spacectl stack open
2024/10/08 09:23:40 unsupported repository string: ssh://[email protected]/owner/repo.git

The gh cli repo already has existing logic for a handful of possible git urls, so this PR includes a dependency update so the /cli/git package can be imported and used for repo detection.

Both spacectl and cli are MIT-licensed, so there (hopefully) won't be licensing concerns
https://github.com/spacelift-io/spacectl/blob/main/LICENSE
https://github.com/cli/cli/blob/v2.57.0/LICENSE

@jeremyhager jeremyhager changed the title Further improve repository string detection Further improve repository string detection for open command Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant