Skip to content

Commit 039808a

Browse files
committed
add empty properties to inputs param
1 parent 926d049 commit 039808a

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

pkg/github/__toolsnaps__/actions_run_trigger.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"properties": {
99
"inputs": {
1010
"description": "Inputs the workflow accepts. Only used for 'run_workflow' method.",
11+
"properties": {},
1112
"type": "object"
1213
},
1314
"method": {

pkg/github/actions.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,7 @@ func ActionsRunTrigger(t translations.TranslationHelperFunc) inventory.ServerToo
544544
"inputs": {
545545
Type: "object",
546546
Description: "Inputs the workflow accepts. Only used for 'run_workflow' method.",
547+
Properties: map[string]*jsonschema.Schema{},
547548
},
548549
"run_id": {
549550
Type: "number",
@@ -574,11 +575,9 @@ func ActionsRunTrigger(t translations.TranslationHelperFunc) inventory.ServerToo
574575
runID, _ := OptionalIntParam(args, "run_id")
575576

576577
// Get optional inputs parameter
577-
var inputs map[string]any
578-
if requestInputs, ok := args["inputs"]; ok {
579-
if inputsMap, ok := requestInputs.(map[string]any); ok {
580-
inputs = inputsMap
581-
}
578+
inputs, err := OptionalParam[map[string]any](args, "inputs")
579+
if err != nil {
580+
return utils.NewToolResultError(err.Error()), nil, nil
582581
}
583582

584583
// Validate required parameters based on action type

0 commit comments

Comments
 (0)