diff options
| author | Joe Mou <dev@mou.fo> | 2026-05-27 14:02:36 -0400 |
|---|---|---|
| committer | Joe Mou <dev@mou.fo> | 2026-05-27 23:38:34 -0400 |
| commit | 745ac9d83234cb060bf802527efd90d301ecc491 (patch) | |
| tree | 63ff86be00a976e5a45c8905e06b51b37f53eded /cgithub/src/scraper.test.ts | |
| parent | c57123139794c3ef174b62c6bd2a54a60bbf3327 (diff) | |
Pull request index
Diffstat (limited to 'cgithub/src/scraper.test.ts')
| -rw-r--r-- | cgithub/src/scraper.test.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cgithub/src/scraper.test.ts b/cgithub/src/scraper.test.ts index 236b0f5..a4b834e 100644 --- a/cgithub/src/scraper.test.ts +++ b/cgithub/src/scraper.test.ts @@ -4,6 +4,7 @@ import { getGitHubBlob, getGitHubCommits, getGitHubIssues, + getGitHubPulls, getGitHubRelease, getGitHubReleases, getGitHubRepo, @@ -150,6 +151,16 @@ describe("GitHub scraper", () => { assert.ok(data.issues.every((issue) => issue.title !== "")); }); + it("should fetch pull requests", async () => { + const data = await getGitHubPulls("actions", "deploy-pages", { q: "state:closed" }); + + assert.strictEqual(data.repo.owner, "actions"); + assert.strictEqual(data.repo.name, "deploy-pages"); + const pr411 = data.pulls.find((pull) => pull.number === 411); + assert.ok(pr411); + assert.strictEqual(pr411.title, "update node version"); + }); + it("should fetch commits", async () => { const data = await getGitHubCommits("actions", "deploy-pages", "main", ""); |
