diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-03-25 14:23:33 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-03-25 14:41:47 +0100 |
commit | 69f0021518a93db9fef11b45a464457eb9890ac5 (patch) | |
tree | d7bf38cbddd5da31ea577e5c61df8e9c88e184c4 /app/History/Issues.hs | |
parent | 4a77e429e371bae4ab50551c7d382c6bd0af2eae (diff) |
fix: fix determine closed issues
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 |