Skip to content

Commit 1d577ef

Browse files
reoved problematic count and used len() method
1 parent 9f8578e commit 1d577ef

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

list_all_github_app_in_org.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,9 @@ def list_github_apps_in_organization(organization: str):
2828
else:
2929
print(f'Listing GitHub Apps in {organization} failed')
3030

31-
total_num_of_github_app_installations = response_json['total_count']
32-
print(f'Found {total_num_of_github_app_installations} GitHub App in {organization} organization')
33-
3431
# Extract the list of dictionaries
3532
list_of_installations = response_json["installations"]
33+
print(f'Found {len(list_of_installations)} GitHub App in {organization} organization')
3634

3735
# Convert list of dictionaries to JSON string
3836
json_data = json.dumps(list_of_installations, indent=4)

0 commit comments

Comments
 (0)