MCPcopy Create free account
hub / github.com/Scalingo/cli / DeploymentsAutoComplete

Function DeploymentsAutoComplete

cmd/autocomplete/deployments.go:14–31  ·  view source on GitHub ↗
(ctx context.Context, c *cli.Command)

Source from the content-addressed store, hash-verified

12)
13
14func DeploymentsAutoComplete(ctx context.Context, c *cli.Command) error {
15 client, err := config.ScalingoClient(ctx)
16 if err != nil {
17 return errors.Wrapf(ctx, err, "fail to get Scalingo client")
18 }
19 currentApp := detect.CurrentApp(ctx, c)
20
21 deployments, err := client.DeploymentList(ctx, currentApp)
22 if err != nil {
23 return errors.Wrapf(ctx, err, "list deployments for app %s", currentApp)
24 }
25
26 for _, deployment := range deployments {
27 fmt.Println(deployment.ID)
28 }
29
30 return nil
31}

Callers 1

deployments.goFile · 0.92

Calls 2

ScalingoClientFunction · 0.92
CurrentAppFunction · 0.92

Tested by

no test coverage detected