Skip to content

Commit 07910f3

Browse files
fixing github app list scrpit
1 parent 03fc6f3 commit 07910f3

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

list_all_github_app_in_org.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,22 @@ def list_github_apps_in_organization(organization: str):
3333
list_of_installations = response_json["installations"]
3434
print(f'Found {len(list_of_installations)} GitHub App in {organization} organization')
3535

36-
# Convert list of dictionaries to JSON string
37-
json_data = json.dumps(list_of_installations, indent=4)
36+
# Convert list of dictionaries to JSON string
37+
json_data = json.dumps(list_of_installations, indent=4)
3838

39-
# Write JSON string to a file
40-
with open("list_of_github_installations.json", "w") as file:
41-
file.write(json_data)
39+
# Write JSON string to a file
40+
with open("list_of_github_installations.json", "w") as file:
41+
file.write(json_data)
4242

43-
app_short_list = []
44-
for app in list_of_installations:
45-
app_dict = {}
46-
app_dict['id'] = app['id']
47-
app_dict['app_id'] = app['app_id']
48-
app_dict['app_slug'] = app['app_slug']
49-
app_short_list.append(app_dict)
43+
app_short_list = []
44+
for app in list_of_installations:
45+
app_dict = {}
46+
app_dict['id'] = app['id']
47+
app_dict['app_id'] = app['app_id']
48+
app_dict['app_slug'] = app['app_slug']
49+
app_short_list.append(app_dict)
5050

51-
return app_short_list
51+
return app_short_list
5252

5353
def main():
5454
""" To test the code """

0 commit comments

Comments
 (0)