File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -27,11 +27,13 @@ def list_github_apps_in_organization(organization: str):
27
27
print (f'Listing GitHub Apps in { organization } organization successful' )
28
28
else :
29
29
print (f'Listing GitHub Apps in { organization } failed' )
30
-
30
+ print ( response_json )
31
31
# Extract the list of dictionaries
32
- list_of_installations = response_json ["installations" ]
33
- print (f'Found { len (list_of_installations )} GitHub App in { organization } organization' )
34
-
32
+ if response_json .get ('installationss' ) is not None :
33
+ list_of_installations = response_json ["installations" ]
34
+ print (f'Found { len (list_of_installations )} GitHub App in { organization } organization' )
35
+ else :
36
+ exit ()
35
37
# Convert list of dictionaries to JSON string
36
38
json_data = json .dumps (list_of_installations , indent = 4 )
37
39
You can’t perform that action at this time.
0 commit comments