perf: drop wasted requests and reuse markdown renderers

pr edit with reviewers and other fields reads the pull request once,
org delete counts only repositories, org view counts concurrently,
team list skips the repository count of all-repository teams,
pr diff --web builds the URL locally, pr list re-reads pull requests
concurrently for review fields, and glamour renderers are built once
per width and color.

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-12 18:44:29 +02:00
1 parent af14803b3a
commit 8bf979099b
8 files changed
+104 -47

No files matched your search

+2 -4
View File
@@ -78,10 +78,8 @@ each pull request, which tea only makes when --json names them.`, Args: argsExac
}
items := window.Items
if a.jsonSelects("reviewers", "reviewer_teams", "merged_by") {
for i, item := range items {
if items[i], err = service.View(cmd.Context(), item.Number); err != nil {
return err
}
if items, err = service.ViewAll(cmd.Context(), items); err != nil {
return err
}
}
noun := map[string]string{"open": "open pull requests", "closed": "closed pull requests", "merged": "merged pull requests", "all": "pull requests"}[state]