Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
Rename flow_vars to flows_filter_vars
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarek Almouhtasseb authored and Tarek Almouhtasseb committed Nov 29, 2023
1 parent f570236 commit e76c17b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/resources/flows_filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ from sym.sdk.integrations import pagerduty
@reducer
def get_flows(user, flows, flow_vars):
def get_flows(user, flows, flow_filter_vars):
if (
pagerduty.is_on_call(user) and
len(pagerduty.get_incidents()) > flow_vars[incident_threshold]
len(pagerduty.get_incidents()) > flows_filter_vars[incident_threshold]
):
# user is on call and there is more than one incident. show admin flows
return flows
Expand Down
4 changes: 2 additions & 2 deletions examples/resources/sym_flows_filter/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ from sym.sdk.integrations import pagerduty


@reducer
def get_flows(user, flows, flow_vars):
def get_flows(user, flows, flows_filter_vars):
if (
pagerduty.is_on_call(user) and
len(pagerduty.get_incidents()) > flow_vars["incident_threshold"]
len(pagerduty.get_incidents()) > flows_filter_vars["incident_threshold"]
):
# Show all flows, including admin flows, if the user is on-call and there is more than one incident.
return flows
Expand Down
2 changes: 1 addition & 1 deletion test-sample/get_flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@


@reducer
def get_flows(user, flows, flow_vars):
def get_flows(user, flows, flows_filter_vars):
return flows

0 comments on commit e76c17b

Please sign in to comment.