MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / Run

Method Run

app/cli/pkg/action/workflow_create.go:38–51  ·  view source on GitHub ↗
(opts *NewWorkflowCreateOpts)

Source from the content-addressed store, hash-verified

36}
37
38func (action *WorkflowCreate) Run(opts *NewWorkflowCreateOpts) (*WorkflowItem, error) {
39 client := pb.NewWorkflowServiceClient(action.cfg.CPConnection)
40 resp, err := client.Create(context.Background(), &pb.WorkflowServiceCreateRequest{
41 Name: opts.Name, ProjectName: opts.Project, Team: opts.Team, ContractName: opts.ContractName,
42 Description: opts.Description,
43 Public: opts.Public,
44 ContractBytes: opts.ContractBytes,
45 })
46 if err != nil {
47 return nil, err
48 }
49
50 return pbWorkflowItemToAction(resp.Result), nil
51}

Callers

nothing calls this directly

Calls 2

CreateMethod · 0.95
pbWorkflowItemToActionFunction · 0.85

Tested by

no test coverage detected