From 69f0021518a93db9fef11b45a464457eb9890ac5 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Mon, 25 Mar 2024 14:23:33 +0100 Subject: fix: fix determine closed issues --- app/History/Issues.hs | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'app/History/Issues.hs') diff --git a/app/History/Issues.hs b/app/History/Issues.hs index 63f1735..1af0084 100644 --- a/app/History/Issues.hs +++ b/app/History/Issues.hs @@ -11,7 +11,7 @@ import Data.Proxy (Proxy) import Data.Text qualified as T import GHC.Generics (Generic) import History.Plan (Id, Planable, Proto, assume, propagate, protoOf) -import History.Scramble (Scramble (..), getIssuesOfFile) +import History.Scramble (Scramble (..), getScramble) import Issue qualified as I data Issues = Issues @@ -24,17 +24,7 @@ instance Planable Issues where type Id Issues = Backend.CommitHash type Proto Issues = Scramble protoOf :: Proxy Issues -> Backend.CommitHash -> IO Scramble - protoOf _ commitHash = do - filesChanged <- Backend.getChangedFilesOf commitHash - issues <- concat <$> mapM (getIssuesOfFile commitHash) filesChanged - pure $ - Scramble - { issues = - M.unions - [ M.singleton issue.id issue | issue <- issues - ], - .. - } + protoOf _ = getScramble assume :: Scramble -> Issues assume (Scramble {..}) = Issues {..} @@ -58,13 +48,10 @@ instance Planable Issues where } } ) - ( \topIssues -> topIssues - ) + (\topIssues -> topIssues) ( \bottomIssues -> M.map - ( \bottomIssue -> - bottomIssue {I.closed = True} - ) + (\bottomIssue -> bottomIssue {I.closed = True}) bottomIssues ) topIssues.issues -- cgit v1.2.3