diff options
| author | Joe Mou <dev@mou.fo> | 2026-02-11 01:56:37 -0500 |
|---|---|---|
| committer | Joe Mou <dev@mou.fo> | 2026-02-11 01:56:49 -0500 |
| commit | 34eea157db19c276fa4a5578707d0f8af2eeffd3 (patch) | |
| tree | 38eb21d948b74930aaecbb52512cad1211c9794a /cgithub/src/scraper.test.ts | |
| parent | 906b021bd44759d14c278a4859fcac9007c9b577 (diff) | |
Add GitHub releases support
Scrapes releases page HTML to display version tags, publish dates, and changelog content.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'cgithub/src/scraper.test.ts')
| -rw-r--r-- | cgithub/src/scraper.test.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cgithub/src/scraper.test.ts b/cgithub/src/scraper.test.ts index 7cafd9c..8c11317 100644 --- a/cgithub/src/scraper.test.ts +++ b/cgithub/src/scraper.test.ts @@ -4,6 +4,7 @@ import { getGitHubBlob, getGitHubCommits, getGitHubIssues, + getGitHubReleases, getGitHubRepo, getGitHubTree, GitHubHTTPError, @@ -159,6 +160,19 @@ describe("GitHub scraper", () => { assert.ok(data.commitGroups.length > 0); }); + + it("should fetch releases", async () => { + const data = await getGitHubReleases("actions", "deploy-pages"); + + assert.strictEqual(data.repo.owner, "actions"); + assert.strictEqual(data.repo.name, "deploy-pages"); + + assert.ok(data.releases.length > 0); + const firstRelease = data.releases[0]; + assert.ok(firstRelease.tagName.length > 0); + assert.ok(firstRelease.title.match(/^v\d/)); + assert.ok(firstRelease.publishedAt.length > 0); + }); }); describe("rich file types", () => { |
