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

feat: base quickstart on remote existing target #999

Merged
merged 12 commits into from
Nov 25, 2024

Conversation

adaam2
Copy link
Contributor

@adaam2 adaam2 commented Oct 7, 2024

This PR adds the ability to bootstrap a new target using a pre-existing specification hosted on Speakeasy's registry. The CLI will now show the most recent 5 targets that have been interacted with (based on the CLI event stream).

If there are any recent target candidates in the workspace, then the user will be presented with the option to choose from an existing SDK or create from scratch at the beginning of Quickstart. If there are no previous generations in a workspace, then the existing "new user" flow will be shown where the user can enter a filepath to a spec:

CleanShot 2024-10-07 at 13 46 20@2x

Then selecting from the list of recent SDKs:

CleanShot 2024-10-07 at 13 46 32@2x

(n.b the look and feel of the select list in the 2nd screenshot will change / look much better once the corresponding charmbracelet/huh#424 pr has been merged)

The end result is that a new workflow file is created that references the existing Registry URI for the spec from the previous target

Next steps

  • Try and re-use as much of the prior target's gen.yaml

@adaam2 adaam2 force-pushed the feat/quickstart-existing-spec branch 2 times, most recently from 303e234 to 4a0e465 Compare October 7, 2024 12:53
internal/remote/sources.go Outdated Show resolved Hide resolved
internal/remote/sources.go Outdated Show resolved Hide resolved
Copy link
Member

@simplesagar simplesagar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for the concept

@adaam2 adaam2 force-pushed the feat/quickstart-existing-spec branch from 4a0e465 to 4a17f4a Compare November 22, 2024 13:40
@adaam2
Copy link
Contributor Author

adaam2 commented Nov 22, 2024

@ryan-timothy-albert I've updated this now so that it checks if a namespace has a main tag. If so, it will include it in the "recents" list shown to the user.

@adaam2 adaam2 force-pushed the feat/quickstart-existing-spec branch from 831a41f to 58e8674 Compare November 22, 2024 17:00
@adaam2 adaam2 force-pushed the feat/quickstart-existing-spec branch from 686c0f9 to f96f463 Compare November 25, 2024 14:47
@adaam2 adaam2 merged commit cdc8050 into main Nov 25, 2024
3 checks passed
@adaam2 adaam2 deleted the feat/quickstart-existing-spec branch November 25, 2024 15:03
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.

4 participants