Add Incremental Diff File Fetching to the Diff Cache

Offen
#181 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
72/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
typescript

Rechercherichtung

Start with packages/core/src/review/diff-cache.ts and trace the full-diff path to find its file filtering and cache behavior. Check the ReviewGitProvider.getCompareDiff interface and the existing diff-cache tests, then add mocked-provider coverage for the new function. Done means it returns files changed between the supplied SHAs, applies the same reviewable-file filter, and follows the existing cache semantics.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

enhancement good first issue

Goal

Add getIncrementalDiffFiles to packages/core/src/review/diff-cache.ts that fetches the commit-to-commit diff instead of the full PR diff.

Background

ReviewGitProvider already exposes getCompareDiff(owner, repo, base, head), but it is only used for the dashboard diff viewer. This sub-issue wires that capability into the review diff path for incremental reviews.

This sub-issue is part of the parent issue: incremental reviews on synchronize events.

What to Build

  • Add getIncrementalDiffFiles to diff-cache.ts that calls github.getCompareDiff(owner, repo, previousCommitSha, newHeadSha)
  • Apply the same reviewable-file filtering used by the full-diff path
  • Respect the existing diff cache semantics so the incremental diff is cached the same way
  • Include PR-level context handling notes: the caller still needs PR title, description, and suppressed findings (handled in the wiring sub-issue)

Done When

  • getIncrementalDiffFiles returns only files changed between the two SHAs
  • Reviewable-file filtering matches the full-diff path behavior
  • Caching behaves consistently with the existing diff cache
  • Unit tests cover the new function with a mocked git provider
  • npm run typecheck, npm test, and npm run lint all pass
Vorherrschende Sprache
TypeScript
Sterne
125
Forks
23
Ø Merge
2 T. 13 Std.
Gemergte PRs (30 T.)
12

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus devarshishimpi/codra

Alle Issues in devarshishimpi/codra

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.