Skip to content

GitHubPullRequestFile

Defined in: pulls/pulls.ts:113

One file as returned by GET /pulls/{pull_number}/files — only the fields any known consumer needs.

filename: string

Defined in: pulls/pulls.ts:115

The file’s path in the repository.


optional patch?: string

Defined in: pulls/pulls.ts:126

This file’s unified-diff hunks (@@ -a,b +c,d @@ headers plus context/added/removed lines) — what a consumer needs to know which RIGHT-side lines a PR review comment can anchor to. Absent for binary files and for diffs too large for GitHub to include.


optional previous_filename?: string

Defined in: pulls/pulls.ts:119

Set only when status === "renamed".


status: "added" | "removed" | "modified" | "renamed" | "copied" | "changed" | "unchanged"

Defined in: pulls/pulls.ts:117

How the pull request changes the file.