Skip to content

Commit 5357ffa

Browse files
committed
fix(feed): fix discussion links and increase announcement count
Update regex to parse GitHub Discussion Atom feed IDs correctly. Increase displayed announcements to 5 to align with community discussions. Keeps release feeds at 10 items (native Atom feed limit). Assisted-by: Google DeepMind Antigravity
1 parent 6e70abf commit 5357ffa

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

src/components/CommunityFeeds.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const CommunityFeeds: React.FC = () => {
8888
<FeedItems
8989
feedId="bluefinAnnouncements"
9090
title="Announcements"
91-
maxItems={3}
91+
maxItems={5}
9292
showDescription={false}
9393
/>
9494
</div>

src/components/FeedItems.tsx

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -194,19 +194,29 @@ const FeedItems: React.FC<FeedItemsProps> = ({
194194
const idMatch = item.id.match(
195195
/^tag:github\.com,\d+:Repository\/(\d+)\/(.+)$/,
196196
);
197-
if (idMatch) {
197+
if (idMatch) {
198198
const [, repoId, tag] = idMatch;
199199
// For GitHub releases, we need to determine the repo name from the feedId
200200
if (feedId === "bluefinReleases") {
201201
itemLink = `https://github.com/ublue-os/bluefin/releases/tag/${tag}`;
202202
} else if (feedId === "bluefinLtsReleases") {
203203
itemLink = `https://github.com/ublue-os/bluefin-lts/releases/tag/${tag}`;
204-
} else if (
205-
feedId === "bluefinDiscussions" ||
206-
feedId === "bluefinAnnouncements"
207-
) {
208-
// For discussions, the ID format might be different, but we'll try
209-
itemLink = `https://github.com/ublue-os/bluefin/discussions/${tag}`;
204+
}
205+
} else {
206+
// Try to match GitHub Discussion IDs
207+
// Format: "tag:github.com,2008:Discussion/12345"
208+
const discussionMatch = item.id.match(
209+
/^tag:github\.com,\d+:Discussion\/(\d+)$/,
210+
);
211+
212+
if (discussionMatch) {
213+
const [, discussionId] = discussionMatch;
214+
if (
215+
feedId === "bluefinDiscussions" ||
216+
feedId === "bluefinAnnouncements"
217+
) {
218+
itemLink = `https://github.com/ublue-os/bluefin/discussions/${discussionId}`;
219+
}
210220
}
211221
}
212222
}

0 commit comments

Comments
 (0)