Method: projects.locations.repositories.pullRequests.listFileDiffs

Lists a pull request's file diffs.

HTTP request


The URLs use gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The pull request to list file diffs for. Format: projects/{project_number}/locations/{locationId}/repositories/{repositoryId}/pullRequests/{pull_request_id}

Query parameters

Parameters
pageSize

integer

Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

pageToken

string

Optional. A token identifying a page of results the server should return.

Request body

The request body must be empty.

Response body

ListPullRequestFileDiffsResponse is the response containing file diffs returned from pullRequests.listFileDiffs.

If successful, the response body contains data with the following structure:

JSON representation
{
  "fileDiffs": [
    {
      object (FileDiff)
    }
  ],
  "nextPageToken": string
}
Fields
fileDiffs[]

object (FileDiff)

The list of pull request file diffs.

nextPageToken

string

A token identifying a page of results the server should return.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • securesourcemanager.pullRequests.listFileDiffs

For more information, see the IAM documentation.

FileDiff

Metadata of a FileDiff. FileDiff represents a single file diff in a pull request.

JSON representation
{
  "name": string,
  "action": enum (Action),
  "sha": string,
  "patch": string
}
Fields
name

string

Output only. The name of the file.

action

enum (Action)

Output only. The action taken on the file (eg. added, modified, deleted).

sha

string

Output only. The commit pointing to the file changes.

patch

string

Output only. The git patch containing the file changes.

Action

Action taken on the file.

Enums
ACTION_UNSPECIFIED Unspecified.
ADDED The file was added.
MODIFIED The file was modified.
DELETED The file was deleted.