Skip to content
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

Conversation

talsabagport
Copy link
Contributor

Description

What - Change to new action

Type of change

Please leave one option from the following and delete the rest:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Non-breaking change (fix of existing functionality that will not change current behavior)
  • Documentation (added/updated documentation)

Copy link
Contributor

@Tankilevitch Tankilevitch left a 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

Comment on lines +50 to +52
if blueprintIdentifier != "" {
actionIdentifier = fmt.Sprintf("%s_%s", blueprintIdentifier, actionIdentifier)
}
Copy link
Contributor

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 )

Comment on lines 45 to 47
if !data.Title.IsNull() {
title := data.Title.ValueString()
action.Title = &title
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if !data.Title.IsNull() {
title := data.Title.ValueString()
action.Title = &title
action.Title = data.Title.ValueStringPointer()

Copy link
Contributor

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

Comment on lines 92 to 95
if !data.Publish.IsNull() {
publish := data.Publish.ValueBool()
action.Publish = &publish
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here ValueBoolPointer()

Comment on lines +92 to +102
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}}",
)),
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

port/action/schema.go Outdated Show resolved Hide resolved
@talsabagport talsabagport merged commit 1c4f3b7 into main May 8, 2024
3 checks passed
@talsabagport talsabagport deleted the PORT-5367-update-iac-providers-to-support-new-actions-api-and-routes branch May 8, 2024 13:41
erikzaadi added a commit that referenced this pull request May 9, 2024
…oviders-to-support-new-actions-api-and-routes"

This reverts commit 1c4f3b7, reversing
changes made to a8b7815.
erikzaadi added a commit that referenced this pull request May 9, 2024
…roviders-to-support-new-actions-api-and-routes"

This reverts commit c316a55.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants