Add PHPUnit test suite, Gitea CI, and fix broken URL pattern
All checks were successful
CI / test (push) Successful in 1m41s
All checks were successful
CI / test (push) Successful in 1m41s
- Add 22 unit tests covering feed parsing, thread rendering, facets, needsRefetch staleness windows, and handleConfigureAction - Add FreshRSS class stubs so tests run without a full FreshRSS install - Add RSS feed fixture (hockeyviz.com snapshot) and thread API fixture for post 3mhtk7awhrp26 (1 root + 2 replies) - Add Gitea Actions workflow (.gitea/workflows/ci.yml) running on PHP 8.2 - Fix POST_URL_PATTERN: using '#' as PCRE delimiter with '#' inside a character class caused PHP to close the pattern early, so no Bluesky URL ever matched; switch delimiter to '~' Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@ declare(strict_types=1);
|
||||
final class BlueskyThreadsExtension extends Minz_Extension {
|
||||
|
||||
private const API_BASE = 'https://public.api.bsky.app/xrpc';
|
||||
private const POST_URL_PATTERN = '#bsky\.app/profile/([^/]+)/post/([^/?#\s]+)#';
|
||||
private const POST_URL_PATTERN = '~bsky\.app/profile/([^/]+)/post/([^/?#\s]+)~';
|
||||
|
||||
// How long a cached thread is considered fresh, based on the post's age.
|
||||
// Posts older than FREEZE_AGE are never re-fetched.
|
||||
|
||||
Reference in New Issue
Block a user