diff --git a/ota.py b/ota.py index 6c8efa9..46d47b4 100644 --- a/ota.py +++ b/ota.py @@ -155,16 +155,12 @@ def _fetch_commit_sha(): f"{GITEA_BASE}/api/v1/repos/{REPO_OWNER}/{REPO_NAME}" f"/branches/{REPO_BRANCH}" ) - info(f"Fetching commit from {url}") try: r = urequests.get(url, headers=_headers()) - info(f"Response status: {r.status_code}") if r.status_code == 200: data = r.json() r.close() - sha = data.get("commit", {}).get("sha") - info(f"Got commit: {sha}") - return sha + return data.get("commit", {}).get("id") r.close() except Exception as e: log_err(f"Failed to fetch commit: {e}")