From e29e8381f302bacbfde5042f166cfedf7ada8e94 Mon Sep 17 00:00:00 2001 From: Fabian Kirchner Date: Wed, 29 Nov 2023 13:58:36 +0100 Subject: refactor: attach issues for each commit in history --- app/History.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/History.hs') diff --git a/app/History.hs b/app/History.hs index 48dbbc7..9501b1b 100644 --- a/app/History.hs +++ b/app/History.hs @@ -26,7 +26,10 @@ import Prelude hiding (id, lines) -- @topic caching -- @backlog -getHistory :: IO ([Issue], [(CommitHash, [IssueEvent])]) +getHistory :: IO [(CommitHash, [IssueEvent], [Issue])] getHistory = do commitInfos <- fromPartialCommitInfos <$> getPartialCommitInfos - pure ((last commitInfos).issues, issueEvents commitInfos) + let commitHashes = map (.hash) commitInfos + issueEventses = map snd $ issueEvents commitInfos + issueses = map (.issues) commitInfos + pure (zip3 commitHashes issueEventses issueses) -- cgit v1.2.3