From 6b912f5b477de3374dee38661e0acf72920d4f5e Mon Sep 17 00:00:00 2001
From: Alexander Foremny <aforemny@posteo.de>
Date: Tue, 7 Nov 2023 14:40:47 +0100
Subject: add author & editor to internal tags

---
 app/Issue/GroupBy.hs | 2 --
 app/Issue/Tag.hs     | 6 ++++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/Issue/GroupBy.hs b/app/Issue/GroupBy.hs
index 62f212e..2b9e514 100644
--- a/app/Issue/GroupBy.hs
+++ b/app/Issue/GroupBy.hs
@@ -18,8 +18,6 @@ import Options.Applicative qualified as O
 -- The internal makers `TODO`, `FIXME`, etc. should be available via the
 -- internal tag @type
 
--- TODO Add author and editor as internal tags
-
 groupByArg :: O.Parser (Maybe T.Text)
 groupByArg =
   O.optional
diff --git a/app/Issue/Tag.hs b/app/Issue/Tag.hs
index 8bbbba9..c2358a8 100644
--- a/app/Issue/Tag.hs
+++ b/app/Issue/Tag.hs
@@ -13,7 +13,7 @@ import Data.Text (Text, pack)
 import Data.Text qualified as T
 import Data.Time.Clock (UTCTime (utctDay))
 import GHC.Generics (Generic)
-import Issue.Provenance (Commit (..), Provenance (..))
+import Issue.Provenance (Author (..), Commit (..), Provenance (..))
 
 data Tag = Tag Text (Maybe Text) deriving (Show, Generic, Binary, Eq)
 
@@ -47,7 +47,9 @@ internalTags title provenance' =
         []
         ( \provenance ->
             [ Tag "createdAt" $ Just $ pack $ show $ utctDay provenance.first.date,
-              Tag "modifiedAt" $ Just $ pack $ show $ utctDay provenance.last.date
+              Tag "modifiedAt" $ Just $ pack $ show $ utctDay provenance.last.date,
+              Tag "author" $ Just $ provenance.first.author.name,
+              Tag "editor" $ Just $ provenance.last.author.name
             ]
         )
         provenance'
-- 
cgit v1.2.3