fix: send GITHUB_TOKEN from download.sh

download.py authenticated its release lookup and download.sh did not, so
past the anonymous quota the shell twin failed with 403. The header goes
to api.github.com only and is read from stdin, out of the process list.
This commit is contained in:
Abdessamad Derraz committed 2026-10-21 10:00:44 +02:00
1 parent 7a120d7a51
commit 932410e00d
3 files changed
+61 -1

No files matched your search

+2 -1
View File
@@ -657,10 +657,11 @@ class EveryGitHubApiCallerSendsTheToken(unittest.TestCase):
refresh_stale had put a token in their environment."""
def test_each_module_naming_the_api_reads_the_token(self):
# download.sh is download.py's twin and called the API bare.
scripts = Path(__file__).resolve().parent.parent / "scripts"
silent = sorted(
str(path.relative_to(scripts))
for path in scripts.rglob("*.py")
for path in [*scripts.rglob("*.py"), *scripts.rglob("*.sh")]
if "api.github.com" in (source := path.read_text(encoding="utf-8"))
and "GITHUB_TOKEN" not in source
and "github_headers(" not in source