Fix Gitea backend not authenticating properly with Gitea

Signed-off-by: magic_rb <richard@brezak.sk>
This commit is contained in:
magic_rb 2024-06-02 16:30:29 +02:00
parent 85ae072719
commit 12e9d639df
Failed to generate hash of commit

View file

@ -289,7 +289,7 @@ def refresh_projects(config: GiteaConfig, repo_cache_file: Path) -> None:
# Gitea doesn't include topics in the default repo listing, unlike GitHub # Gitea doesn't include topics in the default repo listing, unlike GitHub
topics: list[str] = http_request( topics: list[str] = http_request(
f"{config.instance_url}/api/v1/repos/{repo['owner']['login']}/{repo['name']}/topics", f"{config.instance_url}/api/v1/repos/{repo['owner']['login']}/{repo['name']}/topics",
headers={"Authorization": f"token {config.token}"}, headers={"Authorization": f"token {config.token()}"},
).json()["topics"] ).json()["topics"]
repo["topics"] = topics repo["topics"] = topics
repos.append(repo) repos.append(repo)