Skip to content

feat: add new input model, use in projects step#30

Merged
k3llymariee merged 8 commits intomainfrom
kelly/sc-235547/input-models
Mar 18, 2024
Merged

feat: add new input model, use in projects step#30
k3llymariee merged 8 commits intomainfrom
kelly/sc-235547/input-models

Conversation

@k3llymariee
Copy link
Copy Markdown
Contributor

@k3llymariee k3llymariee commented Mar 16, 2024

Adds a new re-usable input model and adds it to the projects step.

ld-cli-set-new-project.mov

@shortcut-integration
Copy link
Copy Markdown

This pull request has been linked to Shortcut Story #235547: Create stubbed out setup command to act as a prototype.

Comment thread internal/setup/wizard.go
Comment on lines -86 to -97
// we need to cast this to get the data out of it, but maybe we can create our own interface with
// common values such as Choice() and Err() so we don't have to cast
p, ok := projModel.(projectModel)
if ok {
if p.err != nil {
m.err = p.err
return m, nil
}
}
// update projModel with the fetched projects
m.steps[projectsStep] = projModel
// go to the next step
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i don't think we actually needed to do this casting here

Comment thread internal/setup/wizard.go
Comment on lines +95 to +96
// we need to cast this to get the data out of it, but maybe we can create our own interface with
// common values such as Choice() and Err() so we don't have to cast
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

but we do need to do it here so i moved that comment down

@k3llymariee k3llymariee marked this pull request as ready for review March 18, 2024 20:50
@k3llymariee k3llymariee merged commit fbc9d0f into main Mar 18, 2024
@k3llymariee k3llymariee deleted the kelly/sc-235547/input-models branch March 18, 2024 20:50
This was referenced Mar 18, 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.

2 participants