steven0711dong commented on a change in pull request #479: Trigger parameter 
issue
URL: https://github.com/apache/openwhisk-cli/pull/479#discussion_r378533246
 
 

 ##########
 File path: commands/trigger.go
 ##########
 @@ -436,47 +442,108 @@ func (t *Trigger) Create(Client *whisk.Client, args 
[]string) error {
                return NewQualifiedNameError(args[0], err)
        }
 
-       paramArray := Flags.common.param
        annotationArray := Flags.common.annotation
-       feedParam := Flags.common.feed
        authToken := Client.Config.AuthToken
 
        // if a feed is specified, create additional parameters which must be 
passed to the feed
-       feedName, feedParams := feedParameters(feedParam, FEED_CREATE, 
triggerName, authToken)
-       // the feed receives all the parameters that are specified on the 
command line so we merge
-       // the feed lifecycle parameters with the command line ones
-       parameters := getParameters(append(paramArray, feedParams...), feedName 
== nil, false)
+       feedQualifiedName, additionalFeedParams := 
feedParameters(Flags.common.feed, FEED_CREATE, triggerName, authToken)
 
        // if a feed is specified, add feed annotation the annotations declared 
on the command line
        // TODO: add test to ensure that generated annotation has precedence
-       if feedName != nil {
-               annotationArray = append(annotationArray, 
getFormattedJSON("feed", feedName.GetFullQualifiedName()))
+       if feedQualifiedName != nil {
+               annotationArray = append(annotationArray, 
getFormattedJSON("feed", feedQualifiedName.GetFullQualifiedName()))
        }
        annotations := getParameters(annotationArray, true, true)
 
+       //Within this if statement, we process users' trigger command using the 
old way.
 
 Review comment:
   I can try to separate the 'old way' and 'new way' into two different 
functions. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to