diff options
Diffstat (limited to 'app/History/Issues.hs')
-rw-r--r-- | app/History/Issues.hs | 21 |
1 files changed, 4 insertions, 17 deletions
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 |