Skip to content

Commit

Permalink
removed deprecated any function
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielle authored and Daniellem97 committed Aug 30, 2024
1 parent fb55209 commit b68aaa8
Showing 1 changed file with 36 additions and 4 deletions.
40 changes: 36 additions & 4 deletions notification/pull-request-comment-summary.rego
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,27 @@ added contains row if {

# regal ignore:line-length
row := sprintf("| Added | `%s` | <details><summary>Value</summary>`%s`</details> |", [x.entity.address, x.entity.data.values])
x.action == "added"
x.entity.entity_type == "resource"
not x.moved
}

added contains row if {
some x in input.run_updated.run.changes

# regal ignore:line-length
row := sprintf("| Added | `%s` | <details><summary>Value</summary>`%s`</details> |", [x.entity.address, x.entity.data.values])
x.action == "destroy-Before-create-replaced"
x.entity.entity_type == "resource"
not x.moved
}

added contains row if {
some x in input.run_updated.run.changes

# regal ignore:deprecated-builtin
any([x.action == "added", x.action == "destroy-Before-create-replaced", x.action == "create-Before-destroy-replaced"])
# regal ignore:line-length
row := sprintf("| Added | `%s` | <details><summary>Value</summary>`%s`</details> |", [x.entity.address, x.entity.data.values])
x.action == "create-Before-destroy-replaced"
x.entity.entity_type == "resource"
not x.moved
}
Expand All @@ -43,9 +61,23 @@ changed contains row if {
deleted contains row if {
some x in input.run_updated.run.changes
row := sprintf("| Deleted | `%s` | :x: |", [x.entity.address])
x.action == "deleted"
x.entity.entity_type == "resource"
not x.moved
}

# regal ignore:line-length, deprecated-builtin
any([x.action == "deleted", x.action == "destroy-Before-create-replaced", x.action == "create-Before-destroy-replaced"])
deleted contains row if {
some x in input.run_updated.run.changes
row := sprintf("| Deleted | `%s` | :x: |", [x.entity.address])
x.action == "destroy-Before-create-replaced"
x.entity.entity_type == "resource"
not x.moved
}

deleted contains row if {
some x in input.run_updated.run.changes
row := sprintf("| Deleted | `%s` | :x: |", [x.entity.address])
x.action == "create-Before-destroy-replaced"
x.entity.entity_type == "resource"
not x.moved
}
Expand Down

0 comments on commit b68aaa8

Please sign in to comment.