MCPcopy
hub / github.com/jesseduffield/lazygit / loadCachedPullRequests

Method loadCachedPullRequests

pkg/gui/gui.go:634–650  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

632}
633
634func (gui *Gui) loadCachedPullRequests() []*models.GithubPullRequest {
635 repoPath := gui.git.RepoPaths.RepoPath()
636 cachedPRs := gui.c.GetAppState().GithubPullRequests[repoPath]
637
638 return lo.Map(cachedPRs, func(cached config.CachedPullRequest, _ int) *models.GithubPullRequest {
639 return &models.GithubPullRequest{
640 HeadRefName: cached.HeadRefName,
641 Number: cached.Number,
642 Title: cached.Title,
643 State: cached.State,
644 Url: cached.Url,
645 HeadRepositoryOwner: models.GithubRepositoryOwner{
646 Login: cached.HeadRepositoryOwner,
647 },
648 }
649 })
650}
651
652func (gui *Gui) getViewBufferManagerForView(view *gocui.View) *tasks.ViewBufferManager {
653 manager, ok := gui.viewBufferManagerMap[view.Name()]

Callers 1

resetStateMethod · 0.95

Calls 2

RepoPathMethod · 0.80
GetAppStateMethod · 0.65

Tested by

no test coverage detected