feat(prd-1): implement M4a - Forgejo REST data fetching (PR/issue basics)
- Add src/forgejo/data/fetcher.ts: REST-based data fetcher replacing GraphQL queries with parallel Octokit REST calls (PR details + files + commits via Promise.all, issue details, file status mapping, SHA computation, TOCTOU title/body protection, user display name) - Add test/forgejo-data-fetcher.test.ts with 31 test cases covering field mapping, parallel fetch, null handling, and edge cases - Output matches FetchDataResult type for downstream compatibility - Comments/reviews left empty (M4b scope) Progress: 33% complete (M1, M2, M4a done) - next: M4b or M5 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
385acacc32
commit
6e104a33dc
3 files changed
+973
-1
No files matched your search
@@ -243,7 +243,7 @@ The upstream repo has 13 workflows in `.github/workflows/`. Strategy:
|
||||
|
||||
### Phase 2 - Core Data Fetching (the hard part)
|
||||
|
||||
- [ ] **M4a: Forgejo REST data fetching — PR/Issue basics** — Implement REST-based fetching for PR details, issue details, changed files, and commits. Produce output matching the `FetchDataResult` type that existing code expects.
|
||||
- [x] **M4a: Forgejo REST data fetching — PR/Issue basics** — Implement REST-based fetching for PR details, issue details, changed files, and commits. Produce output matching the `FetchDataResult` type that existing code expects.
|
||||
- Files: `src/forgejo/data/fetcher.ts` (NEW)
|
||||
- Depends on: M1, M2
|
||||
- Success: Can fetch PR/issue title, body, author, state, files, commits from Forgejo REST API.
|
||||
|
||||
Reference in new issue
Block a user