Skip to content

Commit

Permalink
atom: include HSEC ID in entry title
Browse files Browse the repository at this point in the history
The human-friendly presentations of the feed ought to include the
HSEC ID somewhere :)
  • Loading branch information
frasertweedale authored and blackheaven committed Apr 3, 2024
1 parent 2eac337 commit 88fc2a0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion code/hsec-tools/src/Security/Advisories/Generate/HTML.hs
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,18 @@ feed advisories =
toEntry advisory =
( Feed.nullEntry
(toUrl advisory)
(Feed.TextString $ Advisories.advisorySummary advisory)
(mkSummary advisory)
(T.pack . iso8601Show $ Advisories.advisoryModified advisory)
)
{ Feed.entryLinks = [(Feed.nullLink (toUrl advisory)) { Feed.linkRel = Just (Left "alternate") }]
, Feed.entryContent = Just (Feed.HTMLContent (Advisories.advisoryHtml advisory))
}

mkSummary advisory =
Feed.TextString $
T.pack (Advisories.printHsecId (Advisories.advisoryId advisory))
<> " - "
<> Advisories.advisorySummary advisory
toUrl advisory = advisoriesRootUrl <> "/" <> advisoryLink (Advisories.advisoryId advisory)

renderFeed :: [Advisories.Advisory] -> Text
Expand Down

0 comments on commit 88fc2a0

Please sign in to comment.