Files
xExtension-BlueskyThreads/tests/fixtures/thread_3mhtk7awhrp26.json
James Griffin 932d7a5f0e
All checks were successful
CI / test (push) Successful in 1m41s
Add PHPUnit test suite, Gitea CI, and fix broken URL pattern
- 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>
2026-03-26 15:41:07 -03:00

92 lines
3.6 KiB
JSON

{
"thread": {
"$type": "app.bsky.feed.defs#threadViewPost",
"post": {
"uri": "at://did:plc:d4324t32vfi5xzydqbh2qdj3/app.bsky.feed.post/3mhtk7awhrp26",
"cid": "bafyreicfake1",
"author": {
"did": "did:plc:d4324t32vfi5xzydqbh2qdj3",
"handle": "hockeyviz.com",
"displayName": "Micah McCurdy",
"avatar": "https://cdn.bsky.app/img/avatar/plain/did:plc:d4324t32vfi5xzydqbh2qdj3/bafkreifake1@jpeg"
},
"record": {
"$type": "app.bsky.feed.post",
"text": "Discussion about Gold Drafting always focusses on tanking, but really eliminating tanking discourse is a (very real) side-benefit. The primary benefit is that fans of bad teams get to enjoy the few late-season wins that they get, without having to add any games to the schedule.",
"createdAt": "2026-03-24T21:43:00.000Z",
"facets": []
},
"embed": {
"$type": "app.bsky.embed.record#view",
"record": {
"$type": "app.bsky.embed.record#viewRecord",
"uri": "at://did:plc:otherfake/app.bsky.feed.post/3mhtjo3rtkn26",
"author": {
"handle": "hockeyviz.com",
"displayName": "Micah McCurdy"
},
"value": {
"text": "The NHL, and many other leagues, would be improved by adopting Gold drafting, which makes the existing schedule more exciting for fans, eliminates tanking discourse, and gives the best draft picks (on average) to the weakest teams, who need them the most. This is the 2025-2026 thread. #GoldRace",
"facets": []
},
"embeds": []
}
},
"replyCount": 2,
"repostCount": 4,
"likeCount": 31,
"indexedAt": "2026-03-24T21:43:01.000Z"
},
"replies": [
{
"$type": "app.bsky.feed.defs#threadViewPost",
"post": {
"uri": "at://did:plc:replier1fake/app.bsky.feed.post/3mhtreplyone",
"cid": "bafyreicfake2",
"author": {
"did": "did:plc:replier1fake",
"handle": "example.bsky.social",
"displayName": "Reply Person One",
"avatar": "https://cdn.bsky.app/img/avatar/plain/did:plc:replier1fake/bafkreifake2@jpeg"
},
"record": {
"$type": "app.bsky.feed.post",
"text": "Great point about the side benefits! The tanking argument always dominates but you're right that it's secondary.",
"createdAt": "2026-03-24T21:55:00.000Z",
"facets": []
},
"replyCount": 0,
"repostCount": 1,
"likeCount": 5,
"indexedAt": "2026-03-24T21:55:01.000Z"
},
"replies": []
},
{
"$type": "app.bsky.feed.defs#threadViewPost",
"post": {
"uri": "at://did:plc:replier2fake/app.bsky.feed.post/3mhtreplytwo",
"cid": "bafyreicfake3",
"author": {
"did": "did:plc:replier2fake",
"handle": "hockeyfan.bsky.social",
"displayName": "Hockey Fan",
"avatar": "https://cdn.bsky.app/img/avatar/plain/did:plc:replier2fake/bafkreifake3@jpeg"
},
"record": {
"$type": "app.bsky.feed.post",
"text": "The fan experience angle is so underrated. Late-season games for bad teams actually matter under Gold.",
"createdAt": "2026-03-24T22:10:00.000Z",
"facets": []
},
"replyCount": 0,
"repostCount": 0,
"likeCount": 3,
"indexedAt": "2026-03-24T22:10:01.000Z"
},
"replies": []
}
]
}
}