openwhisk icon indicating copy to clipboard operation
openwhisk copied to clipboard

git package does not specify triggerName as a required parameter for webhook

Open starpit opened this issue 10 years ago • 4 comments

the webhook.js source code has

  var triggerName = params.triggerName.split("/");

but the installGit.sh script does not mention triggerName even as a parameter, let alone that it is required.

i'm not sure what the right fix is here. it seems odd that a feed takes as input the trigger name. shouldn't this be an implicit part of every feed invocation, something that is passed through by the controller?

otherwise, how can i construct a form for the user to fill out? i'm already asking them for a name for the trigger. but i don't know that i need to pass this through to the feed (since the metadata doesn't tell me there is a required triggerName attribute); even if it did, how would i know that the name i'm already asking the user to provide is the same one that the webhook CREATE invocation also requires?

starpit avatar Jun 22 '16 13:06 starpit

The webhook.js has been written to use as feed and not as action. When you use it as feed, params.triggerName is set implicitly. So it is not required, on executing the action as feed. But I agree, that the parameter is required, if you want to use it as action.

cbickel avatar Jun 22 '16 13:06 cbickel

screen shot 2016-06-22 at 9 50 35 am

i get that when invoking the webhook action for the CREATE lifecycle event.

starpit avatar Jun 22 '16 13:06 starpit

i'll keep experimenting to see if i can push something through. i'm also blocked by #702

starpit avatar Jun 22 '16 13:06 starpit

ok, i've routed around #702 for the time being, and am able to see successful webhook rule invocations. so i'll close this one for now

starpit avatar Jun 22 '16 14:06 starpit