aboutsummaryrefslogtreecommitdiffstats
path: root/app/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/Main.hs')
-rw-r--r--app/Main.hs17
1 files changed, 9 insertions, 8 deletions
diff --git a/app/Main.hs b/app/Main.hs
index 3bb60e2..28a32bb 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -447,6 +447,7 @@ module Main where
import Control.Applicative ((<|>))
import Data.Function ((&))
+import Issue.Provenance qualified as I
import Data.List (find, isPrefixOf)
import Data.Maybe (catMaybes)
import Data.Text qualified as T
@@ -610,13 +611,13 @@ main = do
keyword "in"
<+> value (T.pack issue.file <> ":" <> T.pack (show issue.start.row))
commit = fromProvenanceDef (keyword "via" <+> value (T.pack "HEAD")) $
- \I.Provenance {firstCommit} -> keyword "via" <+> value (T.take 7 firstCommit)
+ \I.Provenance {first} -> keyword "via" <+> value (T.take 7 first.hash)
author = fromProvenance $
- \I.Provenance {authorName, authorEmail} ->
- ( keyword "by" <+> value (authorName <> " <" <> authorEmail <> ">")
+ \I.Provenance {first} ->
+ ( keyword "by" <+> value (first.author.name <> " <" <> first.author.email <> ">")
)
date' = fromProvenance $
- \I.Provenance {date} -> keyword "on" <+> value (show (utctDay date))
+ \I.Provenance {first} -> keyword "on" <+> value (show (utctDay first.date))
fromProvenanceDef def = flip (maybe def) issue.provenance
fromProvenance = flip fmap issue.provenance
@@ -671,13 +672,13 @@ main = do
"HEAD"
Just provenance ->
"\nvia "
- ++ T.unpack provenance.firstCommit
+ ++ T.unpack provenance.first.hash
++ "\nby "
- ++ T.unpack provenance.authorName
+ ++ T.unpack provenance.first.author.name
++ " <"
- ++ T.unpack provenance.authorEmail
+ ++ T.unpack provenance.first.author.email
++ ">\nat "
- ++ show provenance.date
+ ++ show provenance.first.date
)
++ "\n\n"
sh_