Skip to content

Commit 90377a0

Browse files
authored
[skip ci] Update fetch-sponsors.py
1 parent 84d6abf commit 90377a0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/fetch-sponsors.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@
5252
}
5353
"""
5454

55+
def save_sponsors_to_file(sponsors_data, filename="meta/sponsors.json"):
56+
print(sponsors_data)
57+
os.makedirs(os.path.dirname(filename), exist_ok=True)
58+
with open(filename, "w") as f:
59+
json.dump(sponsors, f, indent=2)
60+
5561
def fetch_sponsors(github_token, login):
5662
headers = {
5763
"Authorization": f"Bearer {github_token}",
@@ -115,7 +121,7 @@ def main():
115121
all_sponsors.extend(sponsors)
116122

117123
merged_sponsors = merge_sponsors(all_sponsors)
118-
print(json.dumps(merged_sponsors, indent=2))
124+
save_sponsors_to_file(merged_sponsors)
119125

120126
if __name__ == "__main__":
121127
main()

0 commit comments

Comments
 (0)