Skip to content

Commit

Permalink
Boolean Values for Env fix (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
dibyanshuMoj authored Mar 27, 2024
1 parent 40fe7e1 commit 60998cf
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions github_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,14 @@ def fetch_values_for_allowlist_key(yaml_data, key):

# This method read the value stored in dictionary passed to it checks if the ip allow list is present or not and returns boolean

def is_ipallowList_enabled(yaml_data):
def is_ipallowList_enabled(yaml_data):
ip_allow_list_enabled = False
if len(yaml_data) !=0:
ip_allow_list_enabled = True
if isinstance(yaml_data, dict):
for value in yaml_data.values():
if isinstance(value, dict) and value:
ip_allow_list_enabled= True
return ip_allow_list_enabled

def process_repo(**component):

allow_list_key = "allowlist"
Expand Down

0 comments on commit 60998cf

Please sign in to comment.