From ef7746c4be4f0d63e830878b996562c1878b4195 Mon Sep 17 00:00:00 2001 From: FasterSpeeding Date: Sun, 7 Apr 2024 18:18:49 +0100 Subject: [PATCH] Specify the github API version (#27) --- runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runner.py b/runner.py index 524f0af..203d7b0 100644 --- a/runner.py +++ b/runner.py @@ -60,7 +60,7 @@ def _now() -> str: def _poll(webhook_url: str, tracker_path: pathlib.Path, api_url: str, params: dict[str, str], last_update: str) -> str: params = {**params, "since": last_update} - with requests.get(api_url, params=params) as resp: + with requests.get(api_url, params=params, headers={"X-GitHub-Api-Version": "2022-11-28"}) as resp: resp.raise_for_status() data = typing.cast("list[Commit]", resp.json()) logging.info("GITHUB: %s %s", resp.status_code, resp.reason)