(ctx context.Context, c *cli.Command)
| 12 | ) |
| 13 | |
| 14 | func 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 | } |
no test coverage detected