aboutsummaryrefslogtreecommitdiffstats
path: root/app/History/Scramble.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/History/Scramble.hs')
-rw-r--r--app/History/Scramble.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/History/Scramble.hs b/app/History/Scramble.hs
index 9004dbf..39a1ac7 100644
--- a/app/History/Scramble.hs
+++ b/app/History/Scramble.hs
@@ -5,6 +5,7 @@ module History.Scramble
)
where
+import Backend qualified
import CMark qualified as D
import Comment qualified as G
import Control.Exception (Handler (..), catches)
@@ -17,7 +18,6 @@ import Data.Text.Lazy qualified as LT
import Data.Text.Lazy.Encoding qualified as LT
import Exception qualified as E
import GHC.Generics (Generic)
-import Git qualified
import Issue qualified as I
import Issue.Parser qualified as I
import Issue.Tag qualified as I
@@ -28,14 +28,14 @@ import Render qualified as P
-- | `Scramble` records the complete issues ONLY in files that have
-- been changed in the commit.
data Scramble = Scramble
- { commitHash :: Git.CommitHash,
+ { commitHash :: Backend.CommitHash,
filesChanged :: [FilePath],
issues :: M.Map T.Text I.Issue
}
deriving (Show, Binary, Generic)
-- | Get all issues in the given directory and file.
-getIssuesOfFile :: Git.CommitHash -> FilePath -> IO [I.Issue]
+getIssuesOfFile :: Backend.CommitHash -> FilePath -> IO [I.Issue]
getIssuesOfFile commitHash filename =
( fmap catMaybes . parMapM (fromComment commitHash)
=<< G.getComments commitHash filename
@@ -45,9 +45,9 @@ getIssuesOfFile commitHash filename =
]
-- | Note that `provenance` is trivial and needs to be fixed up later.
-fromComment :: Git.CommitHash -> G.Comment -> IO (Maybe I.Issue)
+fromComment :: Backend.CommitHash -> G.Comment -> IO (Maybe I.Issue)
fromComment commitHash comment = do
- commit <- Git.getCommitOf commitHash
+ commit <- Backend.getCommitOf commitHash
let provenance = I.Provenance commit commit
pure $