Skip to main content

Module diff

Module diff 

Source
Expand description

Diff fetching from GitHub Pull Requests and local git staging.

Provides fetch_pr_diff for retrieving PR diffs via the GitHub REST API and fetch_local_diff for reading git diff --cached output.

Structs§

DiffResult
Result of a successful diff fetch operation.

Constants§

DEFAULT_CHUNK_HEAD_LINES
Default number of lines to preserve from the head when chunking a large diff.
DEFAULT_CHUNK_TAIL_LINES
Default number of lines to preserve from the tail when chunking a large diff.

Functions§

chunk_diff
Chunks a large diff by preserving the first N and last N lines.
chunk_diff_with_params
Chunks a large diff with explicit head and tail line counts.
fetch_file_diff
Fetches diff content from a pre-existing file on disk.
fetch_local_diff
Fetches the locally staged diff via git diff --cached.
fetch_pr_diff
Fetches the diff for a GitHub Pull Request.