This repository has been archived on 2026-04-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
core/packages/gitea-client/star/repos.star
gobha 495bcc94f4 V0.38.4 full composition (#237)
Co-authored-by: gobha <jasafpro@gmail.com>
Co-committed-by: gobha <jasafpro@gmail.com>
2026-03-25 17:29:08 +00:00

22 lines
743 B
Plaintext

# gitea-client — Repository operations
load("star/http_helpers.star", "gitea_get")
def get_repos(conn):
"""List repositories accessible via the connection."""
data = gitea_get(conn, "/repos/search?limit=50&sort=updated")
if data == None:
return None
repos = data if type(data) == "list" else data.get("data", [])
out = []
for r in repos:
out.append({
"full_name": r.get("full_name", ""),
"name": r.get("name", ""),
"owner": r.get("owner", {}).get("login", ""),
"description": r.get("description", ""),
"html_url": r.get("html_url", ""),
"open_issues": r.get("open_issues_count", 0),
})
return out