Skip to content

Add support for new phpBB3 forum structure (Gentoo)#5

Open
arran4 wants to merge 1 commit into
mainfrom
fix/gentoo-forum-support-10752785056601165693
Open

Add support for new phpBB3 forum structure (Gentoo)#5
arran4 wants to merge 1 commit into
mainfrom
fix/gentoo-forum-support-10752785056601165693

Conversation

@arran4

@arran4 arran4 commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Adds support for new phpBB3 forum structure (Gentoo) while maintaining backwards compatibility with existing PHPBB2 forums. Added tests to verify both parsers.


PR created automatically by Jules for task 10752785056601165693 started by @arran4

This commit updates `phpbb2rss` to support the new Gentoo forum layout (phpBB3 / prosilver).
It maintains backwards compatibility with existing PHPBB2 forums by adding a fallback parsing
mechanism that activates when the old structure yields no items.

Unit tests have been added to verify parsing for both the old PHPBB2 (subsilver) and
new phpBB3 (prosilver) layouts.

Co-authored-by: arran4 <111667+arran4@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for parsing phpBB3 forums in phpbb2rss.go when no phpBB2 items are found, along with corresponding tests and test fixtures. However, the test fixtures gentoo_forum.html and gentoo_search.html are currently 504 Gateway Timeout error pages rather than valid forum pages and should be replaced. Additionally, using time.Now() as a fallback when the publication date fails to parse can cause RSS readers to incorrectly flag items as newly updated; a constant zero time or skipping the item is recommended instead.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread gentoo_forum.html
<!DOCTYPE html>
<html>
<head>
<title>Gentoo Linux — Error 504 (Gateway Timeout)</title>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

It appears that gentoo_forum.html is actually a 504 Gateway Timeout error page rather than a valid phpBB3 forum page. This likely happened because the Gentoo forum was down or rate-limiting when the page was fetched. Please replace this file with a valid phpBB3 forum HTML structure, or remove it if it is not used as a test fixture.

Comment thread gentoo_search.html
<!DOCTYPE html>
<html>
<head>
<title>Gentoo Linux — Error 504 (Gateway Timeout)</title>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

It appears that gentoo_search.html is actually a 504 Gateway Timeout error page rather than a valid phpBB3 forum page. This likely happened because the Gentoo forum was down or rate-limiting when the page was fetched. Please replace this file with a valid phpBB3 forum HTML structure, or remove it if it is not used as a test fixture.

Comment thread phpbb2rss.go
Comment on lines +195 to +204
pubDateRaw, hasDatetime := s.Find("dd.lastpost time").Attr("datetime")
var parsedDate time.Time
if hasDatetime {
parsedDate, err = time.Parse(time.RFC3339, pubDateRaw)
if err != nil {
parsedDate = time.Now()
}
} else {
parsedDate = time.Now()
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using time.Now() as a fallback when the publication date is missing or fails to parse can cause RSS readers to treat these items as newly updated every time the feed is generated. Consider using a zero/constant time, or skipping the item if a valid date cannot be parsed, to prevent feed readers from constantly triggering unread notifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant