diff options
author | Alexander Foremny <aforemny@posteo.de> | 2023-10-20 09:55:13 +0200 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2023-11-07 09:50:52 +0100 |
commit | eafbd88429a80f058efaa4efd28fbfb8271065c3 (patch) | |
tree | 35ae08955e34014fa6666bab26807a42fbbbbcee /app/History | |
parent | ea1236f2cf6d3ef4b739b2ca28f47a3bbed42295 (diff) |
record both creation and update in provenance
Diffstat (limited to 'app/History')
-rw-r--r-- | app/History/CommitInfo.hs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/app/History/CommitInfo.hs b/app/History/CommitInfo.hs index 8461b8e..b42e1ba 100644 --- a/app/History/CommitInfo.hs +++ b/app/History/CommitInfo.hs @@ -15,6 +15,7 @@ import History.CommitHash (CommitHash) import History.IssueEvent (IssueEvent (..)) import History.PartialCommitInfo (PartialCommitInfo (..)) import Issue (Issue (..), id) +import Issue.Provenance qualified as I import Issue.Tag qualified as I import TreeGrepper.Match (Position (..)) import Prelude hiding (id) @@ -44,7 +45,15 @@ fromPartialCommitInfos (partialCommitInfo : partialCommitInfos) = ( \old new -> Just new - { provenance = old.provenance, + { provenance = + (\oldProvenance newProvenance -> + ( I.Provenance + { first = oldProvenance.first, + last = newProvenance.last + } + ) + ) + <$> old.provenance <*> new.provenance, internalTags = I.internalTags new.title old.provenance } ) |