Files
tabatago/fetch_logs.py
millianlmx 31cc9e5a1e
Some checks failed
PR → Build → Firebase OTA → LGTM / Build & Deploy to Firebase OTA (pull_request) Failing after 5m3s
PR → Build → Firebase OTA → LGTM / Wait for LGTM comment (pull_request) Has been skipped
fix: change bundle ID from com.tabatago.app to fr.millianlmx.tabatago
2026-06-27 08:28:24 +00:00

25 lines
768 B
Python

import subprocess, json, base64
# Read token from base64-encoded file
with open('.gtb64') as f:
b64 = f.read().strip()
token = base64.b64decode(b64).decode('utf-8')
print(f"Token length: {len(token)}")
# Fetch job 473 logs
import urllib.request
req = urllib.request.Request(
"https://gitea.1000co.fr/api/v1/repos/millianlmx/tabatago/actions/jobs/473/logs",
headers={"Authorization": f"token {token}"}
)
try:
with urllib.request.urlopen(req) as resp:
logs = resp.read().decode('utf-8')
with open('.logs.txt', 'w') as f:
f.write(logs)
print(f"Logs written: {len(logs)} chars")
except urllib.error.HTTPError as e:
print(f"HTTP Error: {e.code} {e.reason}")
body = e.read().decode('utf-8')
print(f"Body: {body[:500]}")