-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change to new action #98
Change to new action #98
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good, minor comments
I still need to go over the tests
if blueprintIdentifier != "" { | ||
actionIdentifier = fmt.Sprintf("%s_%s", blueprintIdentifier, actionIdentifier) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add a comment stating why we do it, and when this would happen ( iiuc when first loading the previous state and moving to the new state )
port/action/actionStateToPortBody.go
Outdated
if !data.Title.IsNull() { | ||
title := data.Title.ValueString() | ||
action.Title = &title |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if !data.Title.IsNull() { | |
title := data.Title.ValueString() | |
action.Title = &title | |
action.Title = data.Title.ValueStringPointer() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be adjusted for Icon & description as well
port/action/actionStateToPortBody.go
Outdated
if !data.Publish.IsNull() { | ||
publish := data.Publish.ValueBool() | ||
action.Publish = &publish | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here ValueBoolPointer()
func StringBooleanOrJQTemplateValidator() []validator.String { | ||
return []validator.String{ | ||
stringvalidator.Any( | ||
stringvalidator.OneOf("true", "false"), | ||
stringvalidator.RegexMatches( | ||
regexp.MustCompile(`^[\n\r\s]*{{.*}}[\n\r\s]*$`), | ||
"must be a valid jq template: {{JQ_EXPRESSION}}", | ||
)), | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
…w-actions-api-and-routes
…roviders-to-support-new-actions-api-and-routes" This reverts commit c316a55.
Description
What - Change to new action
Type of change
Please leave one option from the following and delete the rest: