From 9b5bd101f7c511a9a0dd4a12a5480ff2628f0b50 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Wed, 4 Oct 2023 11:16:34 +0200 Subject: add tags to issues --- app/Issue.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/Issue.hs') diff --git a/app/Issue.hs b/app/Issue.hs index 02de257..66047b6 100644 --- a/app/Issue.hs +++ b/app/Issue.hs @@ -9,6 +9,8 @@ import Data.List (find) import Data.Maybe (fromMaybe) import Data.Text (Text) import Data.Text qualified as T +import Issue.Tag (Tag) +import Issue.Tag qualified as I import TreeGrepper.FileType qualified as G import TreeGrepper.Match (Match (..)) import TreeGrepper.Match qualified as G @@ -19,7 +21,8 @@ data Issue = Issue { title :: Text, description :: Text, start :: G.Position, - end :: G.Position + end :: G.Position, + tags :: [Tag] } fromMatch :: G.Result -> G.Match -> Maybe Issue @@ -31,7 +34,8 @@ fromMatch result match = { title = stripMarker (T.strip (T.unlines title)), description = T.strip (T.unlines description), start = match.start, - end = match.end + end = match.end, + tags = I.extract text } else Nothing where -- cgit v1.2.3