test(ext/sw): assert lastCommit URL structure + comment limit/per_page divergence

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
adlee-was-taken
2026-04-27 18:04:56 -04:00
parent 2c94dfaf90
commit 98c962796f
2 changed files with 7 additions and 0 deletions

View File

@@ -120,6 +120,7 @@ export class GiteaHost implements GitHost {
async lastCommit(path: string): Promise<{ sha: string; author: string; date: string } | null> {
try {
// Gitea uses 'limit'; GitHub's equivalent endpoint uses 'per_page'.
const url = `${this.commitsUrl}?path=${encodeURIComponent(path)}&limit=1`;
const resp = await fetch(url, { headers: this.headers });
if (!resp.ok) return null;