summaryrefslogtreecommitdiff
path: root/Biz/Dragons
diff options
context:
space:
mode:
Diffstat (limited to 'Biz/Dragons')
-rw-r--r--Biz/Dragons/Analysis.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Biz/Dragons/Analysis.hs b/Biz/Dragons/Analysis.hs
index f1c1bbd..cfdbf2c 100644
--- a/Biz/Dragons/Analysis.hs
+++ b/Biz/Dragons/Analysis.hs
@@ -77,6 +77,8 @@ newtype Commit = Sha Text
instance Aeson.ToJSON Commit
+instance Aeson.FromJSON Commit
+
-- | The result of analyzing a git repo.
data Analysis = Analysis
{ -- | Where the repo is stored on the local disk.
@@ -105,6 +107,8 @@ data Analysis = Analysis
instance Aeson.ToJSON Analysis
+instance Aeson.FromJSON Analysis
+
run :: [Text] -> FilePath -> IO Analysis
run activeAuthors bareRepo = do
commit <- git bareRepo ["rev-parse", "HEAD"] /> Text.pack /> chomp /> Sha