aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/History.hs8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/History.hs b/app/History.hs
index 3a81fa3..c5953b6 100644
--- a/app/History.hs
+++ b/app/History.hs
@@ -12,7 +12,7 @@ import Data.Function ((&))
import Data.List (foldl', intercalate)
import Data.Maybe (catMaybes, mapMaybe)
import Data.String (fromString)
-import Data.Text (Text, lines, unpack)
+import Data.Text (Text, append, lines, pack, unpack)
import Data.Text.Encoding (decodeUtf8)
import GHC.Generics (Generic)
import Issue (Issue (..), fromMatch, id)
@@ -37,10 +37,8 @@ listIssues filters paths = do
[] ->
pure []
hashFirst : hashesRest -> do
- -- TODO Append ".all" to cache id
- issuesInitial <- cached hashFirst (\_ -> getIssuesCommitAll hashFirst)
- -- TODO Append ".changed" to cache id
- commitInfos <- mapM (\hash -> cached hash (\_ -> getCommitInfo hash)) hashesRest
+ issuesInitial <- cached (append hashFirst (pack ".all")) (\_ -> getIssuesCommitAll hashFirst)
+ commitInfos <- mapM (\hash -> cached (append hash (pack ".changed")) (\_ -> getCommitInfo hash)) hashesRest
-- TODO We also have to get the issues which changed in the working tree
let eventses = getEvents hashFirst issuesInitial commitInfos
let issues = mapMaybe issueFromIssueEvents eventses