mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-26 11:28:51 -06:00
fix: build github api headers with forge_headers
download.py read GITHUB_TOKEN only and missed the gh login token, the readme built its header by hand, and the large files listing cached one failed request as an empty release for the whole run.
This commit is contained in:
1 parent
6138d43dfb
commit
8bfa188960
5 files changed
+44
-27
No files matched your search
@@ -821,12 +821,15 @@ class EveryGitHubApiCallerSendsTheToken(unittest.TestCase):
|
||||
if "api.github.com" in (source := path.read_text(encoding="utf-8"))
|
||||
# arcade_parent_importer names API URLs and sends them through
|
||||
# romset_dat_importer._api_json, which holds the token, and the
|
||||
# scrapers through base_scraper.github_json.
|
||||
# scrapers through base_scraper.github_json, the rest through
|
||||
# core.upstream.fetch_body or forge_headers.
|
||||
and ("Request(" in source or "urlopen(" in source or path.suffix == ".sh")
|
||||
and "GITHUB_TOKEN" not in source
|
||||
and "github_headers(" not in source
|
||||
and "github_json(" not in source
|
||||
and "github_token(" not in source
|
||||
and "forge_headers(" not in source
|
||||
and "fetch_body(" not in source
|
||||
)
|
||||
self.assertEqual(silent, [])
|
||||
|
||||
@@ -855,6 +858,7 @@ class EveryGitHubApiCallerSendsTheToken(unittest.TestCase):
|
||||
and "github_headers(" not in body
|
||||
and "github_token(" not in body
|
||||
and "GITHUB_TOKEN" not in body
|
||||
and "forge_headers(" not in body
|
||||
):
|
||||
silent.append(f"{path.relative_to(scripts)}:{node.name}")
|
||||
self.assertEqual(silent, [])
|
||||
|
||||
Reference in new issue
Block a user