@@ -18,6 +18,8 @@ import (
1818 "github.com/redhat-developer/app-services-cli/pkg/shared/factory"
1919 "github.com/spf13/cobra"
2020
21+ artifactutil "github.com/redhat-developer/app-services-cli/pkg/cmd/registry/artifact/util"
22+
2123 registryinstanceclient "github.com/redhat-developer/app-services-sdk-go/registryinstance/apiv1internal/client"
2224)
2325
@@ -231,5 +233,36 @@ func runInteractivePrompt(opts *options) (err error) {
231233 return err
232234 }
233235
236+ instanceIDPrompt := & survey.Input {
237+ Message : opts .localizer .MustLocalize ("registry.rule.enable.input.instanceID.message" ),
238+ Help : opts .localizer .MustLocalize ("registry.rule.enable.input.instanceID.help" ),
239+ }
240+
241+ err = survey .AskOne (instanceIDPrompt , & opts .registryID )
242+ if err != nil {
243+ return err
244+ }
245+
246+ artifactIDPrompt := & survey.Input {
247+ Message : opts .localizer .MustLocalize ("registry.rule.enable.input.artifactID.message" ),
248+ Help : opts .localizer .MustLocalize ("registry.rule.enable.input.artifactID.help" ),
249+ }
250+
251+ err = survey .AskOne (artifactIDPrompt , & opts .artifactID )
252+ if err != nil {
253+ return err
254+ }
255+
256+ groupPrompt := & survey.Input {
257+ Message : opts .localizer .MustLocalize ("registry.rule.enable.input.group.message" ),
258+ Help : opts .localizer .MustLocalize ("registry.rule.enable.input.group.help" ),
259+ Default : artifactutil .DefaultArtifactGroup ,
260+ }
261+
262+ err = survey .AskOne (groupPrompt , & opts .group )
263+ if err != nil {
264+ return err
265+ }
266+
234267 return nil
235268}
0 commit comments