V0.38.5 git board rewrite (#238)
Co-authored-by: gobha <jasafpro@gmail.com> Co-committed-by: gobha <jasafpro@gmail.com>
This commit is contained in:
@@ -15,9 +15,19 @@
|
||||
# json — encode/decode (universal)
|
||||
|
||||
load("star/http_helpers.star", "gitea_get", "gitea_post", "gitea_patch", "auth_headers", "resp")
|
||||
load("star/repos.star", "get_repos")
|
||||
load("star/issues.star", "get_issues", "get_issue", "create_issue", "update_issue", "add_comment")
|
||||
load("star/ci.star", "get_ci_status")
|
||||
load("star/repos.star", _repos_get = "get_repos")
|
||||
load("star/issues.star", _issues_get = "get_issues", _issue_get = "get_issue", _issue_create = "create_issue", _issue_update = "update_issue", _comment_add = "add_comment")
|
||||
load("star/ci.star", _ci_get = "get_ci_status")
|
||||
|
||||
# Re-export loaded functions so lib.require() can find them in globals.
|
||||
# Starlark load() names are file-local; explicit assignment makes them global.
|
||||
get_repos = _repos_get
|
||||
get_issues = _issues_get
|
||||
get_issue = _issue_get
|
||||
create_issue = _issue_create
|
||||
update_issue = _issue_update
|
||||
add_comment = _comment_add
|
||||
get_ci_status = _ci_get
|
||||
|
||||
|
||||
# ═══════════════════════════════════════════════
|
||||
@@ -111,12 +121,15 @@ def get_prs(conn, owner, repo, state):
|
||||
items = []
|
||||
for p in data:
|
||||
items.append({
|
||||
"number": p.get("number", 0),
|
||||
"title": p.get("title", ""),
|
||||
"state": p.get("state", ""),
|
||||
"head": p.get("head", {}).get("ref", ""),
|
||||
"base": p.get("base", {}).get("ref", ""),
|
||||
"user": (p.get("user") or {}).get("login", ""),
|
||||
"number": p.get("number", 0),
|
||||
"title": p.get("title", ""),
|
||||
"state": p.get("state", ""),
|
||||
"head": p.get("head", {}).get("ref", ""),
|
||||
"base": p.get("base", {}).get("ref", ""),
|
||||
"user": (p.get("user") or {}).get("login", ""),
|
||||
"created_at": p.get("created_at", ""),
|
||||
"html_url": p.get("html_url", ""),
|
||||
"mergeable": p.get("mergeable", None),
|
||||
})
|
||||
return items
|
||||
|
||||
|
||||
Reference in New Issue
Block a user