Skip to content

Commit

Permalink
rename coreCommand field
Browse files Browse the repository at this point in the history
  • Loading branch information
pPrecel committed Oct 31, 2024
1 parent aef731b commit 8561bc4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion internal/cmdcommon/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func addGenericCommands(cmd *cobra.Command, genericCommands *TemplateCommands, a

func addCoreCommands(cmd *cobra.Command, config *KymaConfig, extensionCoreCommands []CoreCommandInfo, availableCoreCommands CoreCommandsMap) {
for _, expectedCoreCommand := range extensionCoreCommands {
command, ok := availableCoreCommands[expectedCoreCommand.FeatureID]
command, ok := availableCoreCommands[expectedCoreCommand.ActionID]
if !ok {
// commands doesn't exist in this version of cli and we will not process it
continue
Expand Down
8 changes: 4 additions & 4 deletions internal/cmdcommon/extension_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ explain:
output: test-explain-output
`,
ExtensionCoreCommandsKey: `
- featureID: test-feature-id-1
- featureID: test-feature-id-2
- actionID: test-action-id-1
- actionID: test-action-id-2
`,
},
}
Expand Down Expand Up @@ -143,10 +143,10 @@ func fixTestExtension(name string) Extension {
},
CoreCommands: []CoreCommandInfo{
{
FeatureID: "test-feature-id-1",
ActionID: "test-action-id-1",
},
{
FeatureID: "test-feature-id-2",
ActionID: "test-action-id-2",
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmdcommon/extension_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@ type TemplateCommands struct {

type CoreCommandInfo struct {
// id of the functionality that cli will run when user use this command
FeatureID string `yaml:"featureID"`
ActionID string `yaml:"actionID"`
}

0 comments on commit 8561bc4

Please sign in to comment.