Problem
Both cache wrappers in pkg/gh/installation.go fetch the data, store it in the cache, and then fetch it again for the return value:
inst, err := _listInstallations(ctx)
if err != nil { ... }
responseCache.Set(getCacheInstallationsKey(), inst, 1*time.Hour)
return _listInstallations(ctx) // pkg/gh/installation.go:24 — second full API call (paginated!)
Same pattern in listAppsInstalledRepo (pkg/gh/installation.go:70). Every cache miss therefore costs 2× the API requests (each call paginates through all installations/repos at 100 per page), doubling rate-limit consumption for no benefit. Note the second call's error is also returned unwrapped, bypassing the wrapper's error message.
Suggested fix
(and return repos, nil in listAppsInstalledRepo).
Problem
Both cache wrappers in
pkg/gh/installation.gofetch the data, store it in the cache, and then fetch it again for the return value:Same pattern in
listAppsInstalledRepo(pkg/gh/installation.go:70). Every cache miss therefore costs 2× the API requests (each call paginates through all installations/repos at 100 per page), doubling rate-limit consumption for no benefit. Note the second call's error is also returned unwrapped, bypassing the wrapper's error message.Suggested fix
(and
return repos, nilinlistAppsInstalledRepo).