diff options
author | Fabian Kirchner <fabian.kirchner@hereon.de> | 2023-11-29 13:58:36 +0100 |
---|---|---|
committer | Fabian Kirchner <fabian.kirchner@hereon.de> | 2023-11-29 13:58:36 +0100 |
commit | e29e8381f302bacbfde5042f166cfedf7ada8e94 (patch) | |
tree | fe4f695b969aff9296ae77a7b81549ed61d0cb56 /app/History.hs | |
parent | cffebbf54cba9b99db0629a7179a18ff8168159f (diff) |
refactor: attach issues for each commit in history
Diffstat (limited to 'app/History.hs')
-rw-r--r-- | app/History.hs | 7 |
1 files changed, 5 insertions, 2 deletions
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) |