chore: switch update-check and release URLs to self-hosted Forgejo

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Engelgardt23 2026-05-19 03:46:59 +03:00
parent 82a155d494
commit a372b8c203
3 changed files with 3 additions and 4 deletions

View file

@ -10,4 +10,4 @@ The single source of truth for the project version. Bump this before tagging
a release; CI reads the tag, the code reads this constant."""
__version__ = "0.2.0-dev"
GITHUB_REPO = "Engelgardt23/vrcx"
GITHUB_REPO = "engel/vrcx" # на Forgejo (git.engelgardt23.ru)

View file

@ -170,7 +170,7 @@ def _print_header(console: Console) -> None:
title = f"[bold cyan]vrcx v{__version__}[/] {t('tagline')}"
latest = check_for_update()
if latest:
release_url = f"https://github.com/{GITHUB_REPO}/releases/latest"
release_url = f"https://git.engelgardt23.ru/{GITHUB_REPO}/releases/latest"
notice = t("update_available", tag=latest)
header = Table.grid(expand=True)
header.add_column(justify="left", ratio=1)

View file

@ -29,9 +29,8 @@ def check_for_update() -> str | None:
the currently running version. Returns None when up-to-date, offline,
rate-limited or on any error caller decides how to render."""
try:
url = f"https://api.github.com/repos/{GITHUB_REPO}/releases/latest"
url = f"https://git.engelgardt23.ru/api/v1/repos/{GITHUB_REPO}/releases/latest"
req = urllib.request.Request(url, headers={
"Accept": "application/vnd.github+json",
"User-Agent": f"vrcx/{__version__}",
})
with urllib.request.urlopen(req, timeout=3) as r: