aboutsummaryrefslogtreecommitdiffstats
path: root/app/Issue.hs
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2023-10-04 11:16:34 +0200
committerLibravatar Alexander Foremny <aforemny@posteo.de>2023-10-04 11:16:34 +0200
commit9b5bd101f7c511a9a0dd4a12a5480ff2628f0b50 (patch)
tree3e71a222dad2959e9da9f09354bd926dfe1f7fc0 /app/Issue.hs
parent13b2faa45ca5df4933619a06d28c42686aea8725 (diff)
add tags to issues
Diffstat (limited to 'app/Issue.hs')
-rw-r--r--app/Issue.hs8
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