diff options
author | Alexander Foremny <aforemny@posteo.de> | 2023-10-04 11:16:34 +0200 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2023-10-04 11:16:34 +0200 |
commit | 9b5bd101f7c511a9a0dd4a12a5480ff2628f0b50 (patch) | |
tree | 3e71a222dad2959e9da9f09354bd926dfe1f7fc0 /app/Issue.hs | |
parent | 13b2faa45ca5df4933619a06d28c42686aea8725 (diff) |
add tags to issues
Diffstat (limited to 'app/Issue.hs')
-rw-r--r-- | app/Issue.hs | 8 |
1 files changed, 6 insertions, 2 deletions
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 |