Skip to content

Commit

Permalink
CLI - allow unsetting optional references (IdentifierInput changes) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Taimoor Ahmad authored Dec 29, 2023
1 parent ff6c070 commit a1adb29
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .changes/unreleased/Bugfix-20231229-130258.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Bugfix
body: Fix bugs where unset ID/IdentifierInput fields were not being omitted on update
time: 2023-12-29T13:02:58.119377-05:00
3 changes: 3 additions & 0 deletions .changes/unreleased/Bugfix-20231229-130331.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Bugfix
body: Fix bugs where optional ID/IdentifierInput fields were not being unset on update
time: 2023-12-29T13:03:31.586713-05:00
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ src/dist
.DS_Store
go.work*
**coverage.txt
src/*.yaml

4 changes: 2 additions & 2 deletions src/cmd/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ var getActionCmd = &cobra.Command{
ArgAliases: []string{"ID", "ALIAS"},
Run: func(cmd *cobra.Command, args []string) {
key := args[0]
action, err := getClientGQL().GetCustomAction(*opslevel.NewIdentifier(key))
action, err := getClientGQL().GetCustomAction(key)
cobra.CheckErr(err)
common.PrettyPrint(action)
},
Expand Down Expand Up @@ -141,7 +141,7 @@ var deleteActionCmd = &cobra.Command{
ArgAliases: []string{"ID", "ALIAS"},
Run: func(cmd *cobra.Command, args []string) {
key := args[0]
err := getClientGQL().DeleteWebhookAction(*opslevel.NewIdentifier(key))
err := getClientGQL().DeleteWebhookAction(key)
cobra.CheckErr(err)
fmt.Printf("deleted webhook action: %s\n", key)
},
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/trigger_definition.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var getTriggerDefinitionCmd = &cobra.Command{
ArgAliases: []string{"ID", "ALIAS"},
Run: func(cmd *cobra.Command, args []string) {
key := args[0]
triggerDefinition, err := getClientGQL().GetTriggerDefinition(*opslevel.NewIdentifier(key))
triggerDefinition, err := getClientGQL().GetTriggerDefinition(key)
cobra.CheckErr(err)
common.PrettyPrint(triggerDefinition)
},
Expand Down Expand Up @@ -129,7 +129,7 @@ var deleteTriggerDefinitionCmd = &cobra.Command{
ArgAliases: []string{"ID", "ALIAS"},
Run: func(cmd *cobra.Command, args []string) {
key := args[0]
err := getClientGQL().DeleteTriggerDefinition(*opslevel.NewIdentifier(key))
err := getClientGQL().DeleteTriggerDefinition(key)
cobra.CheckErr(err)
fmt.Printf("deleted trigger definition: %s\n", key)
},
Expand Down

0 comments on commit a1adb29

Please sign in to comment.