Skip to content

Commit

Permalink
Fix item to parse (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvirsegev authored Aug 15, 2023
1 parent 6894be4 commit 738ab03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/cli/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ type (
Mappings struct {
Blueprint string `json:"blueprint,omitempty"`
Filter *string `json:"filter,omitempty"`
ItemsToParse *string `json:"items_to_parse,omitempty"`
ItemsToParse *string `json:"itemsToParse,omitempty"`
Entity *EntityProperty `json:"entity,omitempty"`
}
)
Expand Down
2 changes: 2 additions & 0 deletions port/webhook/resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ func TestAccPortWebhook(t *testing.T) {
{
"blueprint" = "%s",
"filter" = ".headers.\"X-GitHub-Event\" == \"pull_request\"",
"items_to_parse" = "body.pull_request",
"entity" = {
"identifier" = ".body.pull_request.id | tostring",
"title" = ".body.pull_request.title",
Expand Down Expand Up @@ -145,6 +146,7 @@ func TestAccPortWebhook(t *testing.T) {
resource.TestCheckResourceAttr("port_webhook.create_pr", "security.request_identifier_path", "body.repository.full_name"),
resource.TestCheckResourceAttr("port_webhook.create_pr", "mappings.0.blueprint", identifier),
resource.TestCheckResourceAttr("port_webhook.create_pr", "mappings.0.filter", ".headers.\"X-GitHub-Event\" == \"pull_request\""),
resource.TestCheckResourceAttr("port_webhook.create_pr", "mappings.0.items_to_parse", "body.pull_request"),
resource.TestCheckResourceAttr("port_webhook.create_pr", "mappings.0.entity.identifier", ".body.pull_request.id | tostring"),
resource.TestCheckResourceAttr("port_webhook.create_pr", "mappings.0.entity.title", ".body.pull_request.title"),
resource.TestCheckResourceAttr("port_webhook.create_pr", "mappings.0.entity.icon", "Terraform"),
Expand Down

0 comments on commit 738ab03

Please sign in to comment.