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

Function Delete

scmintegrations/delete.go:12–30  ·  view source on GitHub ↗
(ctx context.Context, id string)

Source from the content-addressed store, hash-verified

10)
11
12func Delete(ctx context.Context, id string) error {
13 c, err := config.ScalingoAuthClient(ctx)
14 if err != nil {
15 return errors.Wrapf(ctx, err, "fail to get Scalingo client")
16 }
17
18 integration, err := c.SCMIntegrationsShow(ctx, id)
19 if err != nil {
20 return errors.Wrapf(ctx, err, "not linked SCM integration or unknown SCM integration")
21 }
22
23 err = c.SCMIntegrationsDelete(ctx, id)
24 if err != nil {
25 return errors.Wrapf(ctx, err, "fail to destroy SCM integration")
26 }
27
28 io.Statusf("Your Scalingo account and your %s account are unlinked.\n", scalingo.SCMTypeDisplay[integration.SCMType])
29 return nil
30}

Callers 1

Calls 2

ScalingoAuthClientFunction · 0.92
StatusfFunction · 0.92

Tested by

no test coverage detected