Interface GitHubPullRequestFile

Represents a file changed in a pull request.

interface GitHubPullRequestFile {
    additions: number;
    blob_url: string;
    changes: number;
    contents_url: string;
    deletions: number;
    filename: string;
    patch?: string;
    previous_filename?: string;
    raw_url: string;
    sha: string;
    status:
        | "added"
        | "removed"
        | "modified"
        | "renamed"
        | "copied"
        | "changed"
        | "unchanged";
}

Properties

additions: number

Number of line additions

blob_url: string

URL to the blob on GitHub

changes: number

Total number of changes

contents_url: string

API URL to file contents

deletions: number

Number of line deletions

filename: string

File path

patch?: string

The unified diff patch for this file

previous_filename?: string

Previous file path (for renamed or copied files)

raw_url: string

URL to the raw file

sha: string

File SHA

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

Change status