Skip to content

Commit 566bf43

Browse files
committed
Bulk generator: Rename 'github' to 'get_json_from_github'.
1 parent 7ecf8c8 commit 566bf43

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

misc/scripts/models-as-data/bulk_generate_mad.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,9 @@ def build_databases_from_projects(
233233
return database_results
234234

235235

236-
def github(url: str, pat: str, extra_headers: dict[str, str] = {}) -> dict:
236+
def get_json_from_github(
237+
url: str, pat: str, extra_headers: dict[str, str] = {}
238+
) -> dict:
237239
"""
238240
Download a JSON file from GitHub using a personal access token (PAT).
239241
Args:
@@ -301,7 +303,7 @@ def download_dca_databases(
301303
"""
302304
database_results = []
303305
print("\n=== Finding projects ===")
304-
response = github(
306+
response = get_json_from_github(
305307
f"https://raw.githubusercontent.com/github/codeql-dca-main/data/{experiment_name}/reports/downloads.json",
306308
pat,
307309
)
@@ -319,7 +321,7 @@ def download_dca_databases(
319321
repository = analyzed_database["repository"]
320322
run_id = analyzed_database["run_id"]
321323
print(f"=== Finding artifact: {artifact_name} ===")
322-
response = github(
324+
response = get_json_from_github(
323325
f"https://api.github.com/repos/{repository}/actions/runs/{run_id}/artifacts",
324326
pat,
325327
{"Accept": "application/vnd.github+json"},

0 commit comments

Comments
 (0)