Skip to content

Commit e347a52

Browse files
author
Lee Richardson
committed
Merge fix
1 parent 5fd95a4 commit e347a52

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

ansible/filter_plugins/apigee_helpers.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ def apigee_apps_to_product_map(apps_list: List[dict], product_filter: str = None
4949
return result
5050

5151

52+
def product_app_mapping_to_owner_display(dev_id_to_email: dict, product_app: dict):
53+
if product_app['ownerEndpoint'] == 'developers':
54+
return dev_id_to_email[product_app['owner']]
55+
else:
56+
return product_app['owner']
57+
58+
5259
def apigee_products_to_api_map(products: List[dict], proxy_filter: str = None):
5360

5461
result = dict()
@@ -164,5 +171,6 @@ def filters():
164171
'apigee_teams_to_point_of_contact': apigee_teams_to_point_of_contact,
165172
'apigee_teams_to_members': apigee_teams_to_members,
166173
'apigee_teams_map': apigee_teams_map,
167-
'apigee_product_developers': apigee_product_developers
174+
'apigee_product_developers': apigee_product_developers,
175+
'product_app_mapping_to_owner_display': product_app_mapping_to_owner_display
168176
}

ansible/roles/get-developer-emails/tasks/output-emails.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
- debug: msg="{{ product_slug }} - {{ item.appName}} - {{ dev_id_to_email[item.developerId] }} - {{ apigee_teams_to_members[dev_id_to_email[item.developerId]] | default(dev_id_to_email[item.developerId]) }}"
3+
- debug: msg="{{ product_slug }} - {{ item.appName}} - {{ product_app_mapping_to_owner_display(dev_id_to_email, item) }} - {{ apigee_teams_to_members(teams_map)[product_app_mapping_to_owner_display(dev_id_to_email, item)] | default(product_app_mapping_to_owner_display(dev_id_to_email, item)) }}"
44
loop: "{{ product_app_map.get(product_slug, []) }}"
55
loop_control:
66
label: "{{ product_slug }} - {{ item.appName }} - {{ item.appId }}"

0 commit comments

Comments
 (0)