Problem:
Every call to FetchIssues and FetchIssue in internal/github/issues.go spawns a gh repo view --json nameWithOwner subprocess via repoOwnerName() → FetchRepo(). At startup, with 3 parallel fetches (dashboard, issues, PRs), this fires 3–5 extra gh subprocesses beyond the actual data fetches. The repo name does not change during a hubcap session.
Solution:
Cache the result of repoOwnerName() / FetchRepo() after the first call using a sync.Once and package-level variables in the internal/github package. All subsequent calls return the cached value with no subprocess.
Acceptance Criteria:
Problem:
Every call to
FetchIssuesandFetchIssueininternal/github/issues.gospawns agh repo view --json nameWithOwnersubprocess viarepoOwnerName()→FetchRepo(). At startup, with 3 parallel fetches (dashboard, issues, PRs), this fires 3–5 extraghsubprocesses beyond the actual data fetches. The repo name does not change during a hubcap session.Solution:
Cache the result of
repoOwnerName()/FetchRepo()after the first call using async.Onceand package-level variables in theinternal/githubpackage. All subsequent calls return the cached value with no subprocess.Acceptance Criteria:
gh repo viewis called at most once per hubcap sessionFetchIssues,FetchIssue,FetchPRs, andFetchPRcallsgo test -race ./...passes