Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions app/cli/cmd/integration_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ import (
"github.com/spf13/cobra"
)

var integrationDescription string

func newConfigIntegrationAddCmd() *cobra.Command {
var options []string
var integrationDescription string

cmd := &cobra.Command{
Use: "add INTEGRATION_ID --options key=value,key=value",
Expand Down
2 changes: 1 addition & 1 deletion app/cli/cmd/integration_add_deptrack.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
)

func newIntegrationAddDepTrackCmd() *cobra.Command {
var instance string
var instance, integrationDescription string
var allowAutoCreate bool

cmd := &cobra.Command{
Expand Down
4 changes: 2 additions & 2 deletions app/cli/internal/action/integration_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func NewIntegrationAdd(cfg *ActionsOpts) *IntegrationAdd {
return &IntegrationAdd{cfg}
}

func (action *IntegrationAdd) Run(kind, description string, options map[string]any) (*IntegrationItem, error) {
func (action *IntegrationAdd) Run(extensionID, description string, options map[string]any) (*IntegrationItem, error) {
client := pb.NewIntegrationsServiceClient(action.cfg.CPConnection)

// Transform to structpb for transport
Expand All @@ -41,7 +41,7 @@ func (action *IntegrationAdd) Run(kind, description string, options map[string]a
}

i, err := client.Register(context.Background(), &pb.IntegrationsServiceRegisterRequest{
Kind: kind,
ExtensionId: extensionID,
Config: requestConfig,
DisplayName: description,
})
Expand Down
357 changes: 180 additions & 177 deletions app/controlplane/api/controlplane/v1/integrations.pb.go

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions app/controlplane/api/controlplane/v1/integrations.proto
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ service IntegrationsService {

message IntegrationsServiceRegisterRequest {
// Kind of integration to register
// This should match the ID of an existing integration
string kind = 1 [(validate.rules).string.min_len = 1];
// This should match the ID of an existing extension
string extension_id = 1 [(validate.rules).string.min_len = 1];
// Arbitrary configuration for the integration
google.protobuf.Struct config = 3 [(validate.rules).message.required = true];
// Description of the registration, used for display purposes
Expand All @@ -59,7 +59,9 @@ message IntegrationsServiceRegisterResponse {
}

message IntegrationsServiceAttachRequest{
// UUID of the workflow to attach
string workflow_id = 1 [(validate.rules).string.uuid = true];
// UUID of the integration registration to attach
string integration_id = 2 [(validate.rules).string.uuid = true];
// Arbitrary configuration for the integration
google.protobuf.Struct config = 4 [(validate.rules).message.required = true];
Expand Down
20 changes: 11 additions & 9 deletions app/controlplane/api/gen/frontend/controlplane/v1/integrations.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/controlplane/internal/service/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (s *IntegrationsService) Register(ctx context.Context, req *pb.Integrations
}

// lookup the integration
integration, err := s.integrations.FindByID(req.Kind)
integration, err := s.integrations.FindByID(req.ExtensionId)
if err != nil {
return nil, errors.NotFound("not found", err.Error())
}
Expand Down